]> granicus.if.org Git - neomutt/commitdiff
version.sh: fix(?) failure due to bizarre sh quoting rules
authorBrendan Cully <brendan@kublai.com>
Sat, 2 Jul 2011 00:23:37 +0000 (17:23 -0700)
committerBrendan Cully <brendan@kublai.com>
Sat, 2 Jul 2011 00:23:37 +0000 (17:23 -0700)
I have not checked POSIX, and sh quoting always makes my head hurt, but this
seems to suffice for my sh (actually bash in sh mode) when HGROOT contains a space.

version.sh

index 079b0a1f264f981e7d0a512e4d73eece0f51f693..c3cb5439e66764374219077ed2c25ca856a1763b 100644 (file)
@@ -2,7 +2,7 @@
 
 # Adopt $HGROOT from the environment, if present
 HG=hg
-[ -n "$HGROOT" ] && HG="$HG -R '$HGROOT'"
+[ -n "$HGROOT" ] && HG="$HG -R \$HGROOT"
 
 # Ensure that we have a repo here and that mercurial is installed.  If
 # not, just cat the VERSION file; it contains the latest release number.