]> git.ozlabs.org Git - next-scripts/commitdiff
do nothing for empty series
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 4 Jun 2008 00:49:48 +0000 (10:49 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 4 Jun 2008 00:49:48 +0000 (10:49 +1000)
update_trees

index 7cfab7faaf0be642b4b5e18421449fc208b72116..bca715241677e7e9b7559370d9ccaf1f8f225cc0 100755 (executable)
@@ -53,6 +53,16 @@ for name in $quilters; do
                done <"$sfile.orig" >"$sfile"
        }
 
+       mv -f "$sfile" "$sfile.tmp"
+       sed -e '/^[     ]*$/d' -e '^[   ]*#/d' <"$sfile.tmp" >"$sfile"
+       rm -f "$sfile.tmp"
+       [ -s "$sfile" ] || {
+               log "   quilt series is empty"
+               [ -f "$sfile.orig" ] &&
+                       mv -f "$sfile.orig" "$sfile"
+               continue
+       }
+
        execute git branch -D "quilt/$name"
        execute git checkout -b "quilt/$name" "$rbase" || sh -i || {
                [ -f "$sfile.orig" ] && mv -f $sfile.orig $sfile