updated github_mirror_repos_to_gitlab.sh

pull/2/head
Hari Sekhon 3 years ago
parent 2abba83ce4
commit 9c04d2bef0

@ -47,6 +47,8 @@ Source GitHub and Destination GitLab accounts, in order or priority:
\$GITHUB_ORGANIZATION, \$GITHUB_USER or owner of the \$GITHUB_TOKEN \$GITHUB_ORGANIZATION, \$GITHUB_USER or owner of the \$GITHUB_TOKEN
\$GITLAB_OWNER, \$GITLAB_USER or the owner of the \$GITLAB_TOKEN \$GITLAB_OWNER, \$GITLAB_USER or the owner of the \$GITLAB_TOKEN
If \$CLEAR_CACHE_GITHUB_MIRROR is set to any value, deletes the /tmp cache and uses a fresh clone mirror. This can sometimes clear push errors.
" "
# used by usage() in lib/utils.sh # used by usage() in lib/utils.sh
@ -92,6 +94,10 @@ fi
# not using mktemp because we want to reuse this staging area between runs for efficiency # not using mktemp because we want to reuse this staging area between runs for efficiency
tmpdir="/tmp/github_to_gitlab_mirroring/$owner" tmpdir="/tmp/github_to_gitlab_mirroring/$owner"
if [ -n "${CLEAR_CACHE_GITHUB_MIRROR:-}" ]; then
rm -fr "$tmpdir"
fi
timestamp "Switching to '$tmpdir' directory for mirror staging" timestamp "Switching to '$tmpdir' directory for mirror staging"
mkdir -p -v "$tmpdir" mkdir -p -v "$tmpdir"
cd "$tmpdir" cd "$tmpdir"

Loading…
Cancel
Save