From c2cfbb433742e5180b3f0cc302617458a9b44a70 Mon Sep 17 00:00:00 2001 From: Milan Hauth Date: Mon, 7 Oct 2024 15:28:55 +0200 Subject: [PATCH] fix git-push-all-remotes.sh --- src/scripts/git-push-all-remotes.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/scripts/git-push-all-remotes.sh b/src/scripts/git-push-all-remotes.sh index 995b484..8404002 100755 --- a/src/scripts/git-push-all-remotes.sh +++ b/src/scripts/git-push-all-remotes.sh @@ -3,8 +3,23 @@ set -e set -x +# some file typical for this repo +repo_file="src/whoaremyfriends/wersindmeinefreunde.html" + +bak_pwd="$PWD" + # chdir to repo root -cd "$(dirname "$0")"/../.. +while true; do + if [ -e "$repo_file" ]; then + echo "found the alchi repo root at ${PWD@Q}" + break + fi + if [ "$PWD" = "/" ]; then + echo "error: failed to find the alchi repo root from ${bak_pwd@Q}" + exit 1 + fi + cd .. +done repo_root="$PWD"