packagelib: use LANGUAGE=C for "hg version"
authorToshi MARUYAMA <marutosijp2@gmail.com>
Mon, 12 Jun 2017 03:23:58 +0900
changeset 32777 9dccaff02ad5
parent 32776 0f55adb73e14
child 32778 91e355a0408b
packagelib: use LANGUAGE=C for "hg version" If "hg version" does not contain "version" (e.g. Japanese), $hgversion was empty and rpmbuild failed.
contrib/packagelib.sh
--- a/contrib/packagelib.sh	Mon Jun 12 03:23:56 2017 +0900
+++ b/contrib/packagelib.sh	Mon Jun 12 03:23:58 2017 +0900
@@ -14,7 +14,7 @@
 
     $HG version > /dev/null || { echo 'abort: hg version failed!'; exit 1 ; }
 
-    hgversion=`$HG version | sed -ne 's/.*(version \(.*\))$/\1/p'`
+    hgversion=`LANGUAGE=C $HG version | sed -ne 's/.*(version \(.*\))$/\1/p'`
 
     if echo $hgversion | grep + > /dev/null 2>&1 ; then
         tmp=`echo $hgversion | cut -d+ -f 2`