properly support git in build/i18n-init.sh
authorDaniel Golle <daniel@makrotopia.org>
Tue, 20 Nov 2012 11:42:35 +0000 (11:42 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 20 Nov 2012 11:42:35 +0000 (11:42 +0000)
build/i18n-init.sh

index 9a206bb2a769d38213975571a65facea9237dd42..b20fbc33474499a3c201994347b0fc983dbd8f85 100755 (executable)
@@ -4,7 +4,8 @@ PATTERN=$1
 SCM=
 
 [ -d .svn ] && SCM="svn"
-[ -d .git ] && SCM="git"
+git=$( which git 2>/dev/null )
+[ "$git" ] && "$git" status >/dev/null && SCM="git"
 
 [ -z "$SCM" ] && {
        echo "Unsupported SCM tool" >&2