summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgitea-mirror/gitea-mirror6
-rwxr-xr-xgithub-mirror/github-mirror6
2 files changed, 8 insertions, 4 deletions
diff --git a/gitea-mirror/gitea-mirror b/gitea-mirror/gitea-mirror
index 527df11..0c39975 100755
--- a/gitea-mirror/gitea-mirror
+++ b/gitea-mirror/gitea-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 gitea.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/antarus/gitea-mirror/gentoo-gitea.ssh.priv}
-export GIT_SSH=./gitea-ssh-wrapper
+export GIT_SSH=$(dirname "$(readlink -f "$0")")/gitea-ssh-wrapper
for target in ${targets}; do
# --force because someone may accidentally push into the mirror
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