Browse Source

scripts/update.sh: fix checkout of correct base commit after fetching

Matthias Schiffer 7 years ago
parent
commit
0eac102971
1 changed files with 4 additions and 1 deletions
  1. 4 1
      scripts/update.sh

+ 4 - 1
scripts/update.sh

@@ -16,5 +16,8 @@ for module in $GLUON_MODULES; do
 	git init
 	git config commit.gpgsign false
 
-	git branch -f base $commit 2>/dev/null || git fetch -f $repo $branch:base
+	if ! git branch -f base $commit 2>/dev/null; then
+		git fetch $repo $branch
+		git branch -f base $commit 2>/dev/null
+	fi
 done