summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-08-19 23:58:02 +0100
committerColin Guthrie <colin@mageia.org>2013-08-19 23:58:02 +0100
commit3199d029c027b25bed58813f3a3604f581546318 (patch)
treee4a9709669a926981404334dbe4a00f4cc612cf0 /scripts
parentb2585bb5519c6091e65a145f01841f4aed62596c (diff)
downloadsvn-git-migration-3199d029c027b25bed58813f3a3604f581546318.tar
svn-git-migration-3199d029c027b25bed58813f3a3604f581546318.tar.gz
svn-git-migration-3199d029c027b25bed58813f3a3604f581546318.tar.bz2
svn-git-migration-3199d029c027b25bed58813f3a3604f581546318.tar.xz
svn-git-migration-3199d029c027b25bed58813f3a3604f581546318.zip
Fix some bash errors when git rev-parse returns nothing
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mageia-reset-and-import.sh6
1 files changed, 3 insertions, 3 deletions
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")