diff options
author | teor <teor@torproject.org> | 2019-10-31 14:28:27 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-10-31 14:59:19 +1000 |
commit | 1ffb3b549f9bc88e3eb51bf281720c26f7bd6016 (patch) | |
tree | f6026c140fb97e7085e54b534b171c1a05ba7134 /scripts | |
parent | 38e8cca6a1d44d0edd6fcc9a6e40eadb6e91d789 (diff) | |
download | tor-1ffb3b549f9bc88e3eb51bf281720c26f7bd6016.tar.gz tor-1ffb3b549f9bc88e3eb51bf281720c26f7bd6016.zip |
scripts/git: Add TOR_EXTRA_REMOTE_* for an extra git remote
When running git-setup-dirs.sh.
Part of 32347.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/git/git-setup-dirs.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/git/git-setup-dirs.sh b/scripts/git/git-setup-dirs.sh index 12355af8da..d1ae6a4f99 100755 --- a/scripts/git/git-setup-dirs.sh +++ b/scripts/git/git-setup-dirs.sh @@ -42,6 +42,14 @@ function usage() echo " (current: $GITHUB_PUSH)" echo " TOR_EXTRA_CLONE_ARGS: extra arguments to git clone" echo " (current: $TOR_EXTRA_CLONE_ARGS)" + echo " TOR_EXTRA_REMOTE_NAME: the name of an extra remote" + echo " This remote is not pulled by this script or git-pull-all.sh." + echo " This remote is not pushed by git-push-all.sh." + echo " (current: $TOR_EXTRA_REMOTE_NAME)" + echo " TOR_EXTRA_REMOTE_PULL: the extra remote pull URL." + echo " (current: $TOR_EXTRA_REMOTE_PULL)" + echo " TOR_EXTRA_REMOTE_PUSH: the extra remote push URL" + echo " (current: $TOR_EXTRA_REMOTE_PUSH)" echo " we recommend that you set these env vars in your ~/.profile" } @@ -510,6 +518,17 @@ set_tor_github_pr_fetch_config # Now fetch them all fetch_remote "tor-github" +# Extra remote +if [ "$TOR_EXTRA_REMOTE_NAME" ]; then + printf "%s Setting up remote %s\\n" "$MARKER" \ + "${BYEL}$TOR_EXTRA_REMOTE_NAME${CNRM}" + # Add remote + add_remote "$TOR_EXTRA_REMOTE_NAME" "$TOR_EXTRA_REMOTE_PULL" + set_remote_push "$TOR_EXTRA_REMOTE_NAME" "$TOR_EXTRA_REMOTE_PUSH" + # But leave it to the user to decide if they want to fetch it + #fetch_remote "$TOR_EXTRA_REMOTE_NAME" +fi + # Go over all configured worktree. for ((i=0; i<COUNT; i++)); do branch=${!WORKTREE[$i]:0:1} |