]> git.nbdom.net Git - nb.git/commitdiff
bin/nb-repo-update
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 13 Oct 2024 07:33:10 +0000 (09:33 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 13 Oct 2024 07:33:10 +0000 (09:33 +0200)
bin/nb-repo-update

index f5da6358507b7c6d08eeea2d9c9ae20e908a82b4..590d8307de6644aab53eb0b8d0e1969a117a0892 100755 (executable)
@@ -97,7 +97,8 @@ trap 'exec {F_INDENT1}>&-; exec {F_INDENT2}>&-;' EXIT
 #----------------------------------------------------------
 # Git pull 
 #
-REPO_BRANCH=$(git branch --show-current) || exit
+#REPO_BRANCH=$(git branch --show-current) || exit
+REPO_BRANCH=$(awk 'BEGIN{ex=1}/^\*/{print $2;ex=0}END{exit ex}') || exit
 [ -n "$REPO_BRANCH" ] || exit
 
 if [ -r ~/.ssh/agent.sh ]