diff options
author | Raymaekers Luca <luca@spacehb.net> | 2025-01-09 16:51:59 +0100 |
---|---|---|
committer | Raymaekers Luca <luca@spacehb.net> | 2025-01-09 16:51:59 +0100 |
commit | cc216ca760a6b22c8b8041f525859f4201a52d1f (patch) | |
tree | 7c1ef18d28e226c40d8d0afa97e3a83d3a2c9645 /bin/common/gt | |
parent | 112449dd19eaae6769ef95a70b3e52234256400c (diff) |
checkpoint
Diffstat (limited to 'bin/common/gt')
-rwxr-xr-x | bin/common/gt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/common/gt b/bin/common/gt index 78cc913..5adfe71 100755 --- a/bin/common/gt +++ b/bin/common/gt @@ -8,7 +8,12 @@ # - parallel: optional, if installed will run the commands on all repos with parallel # - gt-cmd, gt-st -export REPOS=$HOME/sync/share/git-track.txt +if [ "$GIT_TRACK_REPOS" ]; then + export REPOS="$GIT_TRACK_REPOS" +else + export REPOS="$HOME/sync/share/git-track.txt" +fi + # prevent file not found errors touch "$REPOS" || exit 1 @@ -56,7 +61,7 @@ while getopts ":a:c:f:lsheu" opt; do repo="$(git rev-parse --show-toplevel)" remote_url="$(git remote show -n origin | awk '/^ Fetch/ {print $NF}')" - # TODO: check if remote_url is not empty + # TODO: check if remote_url is not empty if grep "^$repo " "$REPOS" >/dev/null 2>&1; then printf >&2 'added already.\n' |