From a666abeaabbed73749cd5e2f1745b4a4527c4bc6 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 17 May 2019 14:02:22 +0200 Subject: github-hosts-sync: make user name/mail overridable --- krebs/5pkgs/simple/github-hosts-sync/src/hosts-sync | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/github-hosts-sync/src/hosts-sync b/krebs/5pkgs/simple/github-hosts-sync/src/hosts-sync index d2017ef6..a8973e72 100755 --- a/krebs/5pkgs/simple/github-hosts-sync/src/hosts-sync +++ b/krebs/5pkgs/simple/github-hosts-sync/src/hosts-sync @@ -5,6 +5,8 @@ exec >&2 hosts_srcdir=$GITHUB_HOST_SYNC_SRCDIR hosts_worktree=${GITHUB_HOST_SYNC_WORKTREE-/tmp/hosts} hosts_url=${GITHUB_HOST_SYNC_URL-git@github.com:krebs/hosts.git} +user_mail=${GITHUB_HOST_SYNC_USER_MAIL-$LOGNAME@$(hostname)} +user_name=${GITHUB_HOST_SYNC_USER_NAME-$LOGNAME} test -d "$hosts_worktree" || git clone "$hosts_url" "$hosts_worktree" @@ -24,8 +26,8 @@ rsync \ git add . if test -n "$(git status --porcelain)"; then - git config user.email "$LOGNAME@$(hostname)" - git config user.name "$LOGNAME" + git config user.email "$user_mail" + git config user.name "$user_name" git commit -m bump git push fi -- cgit v1.2.3