[Groonga-commit] groonga/groonga [master] don't use bash feature.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 10月 25日 (火) 16:04:13 JST


Kouhei Sutou	2011-10-25 07:04:13 +0000 (Tue, 25 Oct 2011)

  New Revision: 98288e5d7dda43467adef432ada3e5ff7cf3211c

  Log:
    don't use bash feature.

  Modified files:
    version-gen.sh

  Modified: version-gen.sh (+14 -10)
===================================================================
--- version-gen.sh    2011-10-25 06:10:42 +0000 (d5a0a83)
+++ version-gen.sh    2011-10-25 07:04:13 +0000 (6bda537)
@@ -1,27 +1,31 @@
 #!/bin/sh
+
 case "$0" in
-*/*) cd "${0%/*}";;
+    */*)
+	cd "${0%/*}"
+	;;
 esac
 
 GRN_VERSION_SH=version.sh
 
 if test -f version
 then
-	GRN_VN=$(cat version)
-elif test -d .git -o -f .git 
+    GRN_VN=`cat version`
+elif test -d .git -o -f .git
 then
-	GRN_VN=$(git describe --abbrev=7 HEAD 2>/dev/null)
+    GRN_VN=`git describe --abbrev=7 HEAD 2>/dev/null`
 fi
 
-GRN_VN=$(expr "$GRN_VN" : v*'\(.*\)')
+GRN_VN=`expr "$GRN_VN" : v*'\(.*\)'`
 
 if test -r $GRN_VERSION_SH
 then
-	GRN_VN_OLD=$(sed -e 's/^GROONGA_VERSION=//' <$GRN_VERSION_SH)
+    GRN_VN_OLD=`sed -e 's/^GROONGA_VERSION=//' <$GRN_VERSION_SH`
 else
-	GRN_VN_OLD=unset
+    GRN_VN_OLD=unset
 fi
 
-test "$GRN_VN_OLD" = "$GRN_VN" || {
-	echo "GROONGA_VERSION=$GRN_VN" >$GRN_VERSION_SH
-}
+if test "$GRN_VN_OLD" != "$GRN_VN"
+then
+    echo "GROONGA_VERSION=$GRN_VN" >$GRN_VERSION_SH
+fi




Groonga-commit メーリングリストの案内
Back to archive index