From b2c30d63561a7b69136b6091468340b54425b43e Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 20 Aug 2013 10:37:25 +0100 Subject: Fix some bash errors when git rev-parse returns nothing (like 3199d029) --- scripts/mageia-import.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/mageia-import.sh b/scripts/mageia-import.sh index 26c4301..dc49f4b 100755 --- a/scripts/mageia-import.sh +++ b/scripts/mageia-import.sh @@ -73,7 +73,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") @@ -117,7 +117,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