From 3199d029c027b25bed58813f3a3604f581546318 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 19 Aug 2013 23:58:02 +0100 Subject: Fix some bash errors when git rev-parse returns nothing --- scripts/mageia-reset-and-import.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/mageia-reset-and-import.sh b/scripts/mageia-reset-and-import.sh index 50d2a91..56f1b97 100755 --- a/scripts/mageia-reset-and-import.sh +++ b/scripts/mageia-reset-and-import.sh @@ -121,7 +121,7 @@ else # comparison point. reftreesha1=$(git rev-parse "$ref":) parentref=$ref - while [ $(git rev-parse --quiet --verify "$parentref"^: ) = "$reftreesha1" ]; do + while [ "$(git rev-parse --quiet --verify "$parentref"^: )" = "$reftreesha1" ]; do parentref="$parentref"^ done @@ -361,7 +361,7 @@ for tag in $tags; do # Find the oldest ancestor for which the tree is the same parentref="$ref" - while [ $(git rev-parse --quiet --verify "$parentref"^:) = "$reftreesha1" ]; do + while [ "$(git rev-parse --quiet --verify "$parentref"^:)" = "$reftreesha1" ]; do parentref="$parentref"^ done parent=$(git rev-parse "$parentref") @@ -405,7 +405,7 @@ for branch in $branches; do # Find the oldest ancestor for which the tree is the same parentref="$ref" - while [ $(git rev-parse --quiet --verify "$parentref"^:) = "$reftreesha1" ]; do + while [ "$(git rev-parse --quiet --verify "$parentref"^:)" = "$reftreesha1" ]; do parentref="$parentref"^ done parent=$(git rev-parse "$parentref") -- cgit v1.2.1