Explorar o código

Fix branch name for modules without patches

Matthias Schiffer %!s(int64=10) %!d(string=hai) anos
pai
achega
76167579cd
Modificáronse 1 ficheiros con 8 adicións e 7 borrados
  1. 8 7
      scripts/patch.sh

+ 8 - 7
scripts/patch.sh

@@ -9,13 +9,14 @@ for module in $GLUON_MODULES; do
 	dir="$1"/$module
 	dir="$1"/$module
 	git -C $dir checkout -B patching base
 	git -C $dir checkout -B patching base
 
 
-	if [ -z "$1"/patches/$module/*.patch ]; then continue; fi
-	git -C "$dir" am "$1"/patches/$module/*.patch || (
-		git -C "$dir" am --abort
-		git -C "$dir" checkout patched
-		git -C "$dir" branch -D patching
-		false
-	)
+	if [ "$1"/patches/$module/*.patch ]; then
+		git -C "$dir" am "$1"/patches/$module/*.patch || (
+			git -C "$dir" am --abort
+			git -C "$dir" checkout patched
+			git -C "$dir" branch -D patching
+			false
+		)
+	fi
 	git -C "$dir" checkout -B patched
 	git -C "$dir" checkout -B patched
 	git -C "$dir" branch -d patching
 	git -C "$dir" branch -d patching
 done
 done