aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'github-mirror')
-rwxr-xr-xgithub-mirror/github-mirror6
1 files changed, 4 insertions, 2 deletions
diff --git a/github-mirror/github-mirror b/github-mirror/github-mirror
index 9b048e1..1f71697 100755
--- a/github-mirror/github-mirror
+++ b/github-mirror/github-mirror
@@ -15,9 +15,11 @@ fi
targets=$(git config --get gentoo.mirror.url)
[ -z "${targets}" ] && exit 0
-export GIT_SSH_KEY=$(git config --get gentoo.mirror.pubkey)
+[ -z "${GIT_SSH_KEY}" ] && export GIT_SSH_KEY=$(git config --get github.mirror.pubkey)
+[ -z "${GIT_SSH_KEY}" ] && export GIT_SSH_KEY=$(git config --get gentoo.mirror.pubkey)
+# TODO: fix this into version control!
: ${GIT_SSH_KEY:=/home/mgorny/github-mirror/gentoo_github_id_rsa}
-export GIT_SSH=/home/mgorny/github-mirror/github-ssh-wrapper
+export GIT_SSH=$(dirname "$(readlink -f "$0")")/github-ssh-wrapper
for target in ${targets}; do
# --force because someone may accidentally push into the mirror