X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fbuild_tools%2Fautorevision.sh;h=de4a5b68807d3375085e62d82f55c53b3992814d;hb=800a4e11123a4f0248eb37f7a79fd6a9b4b98c1c;hp=605f242e684f5a14ca4fcd81c9536ced8e5f6b9a;hpb=661598b9d04f04e82982720d835dcb75ac8e11f0;p=synfig.git diff --git a/synfig-studio/trunk/build_tools/autorevision.sh b/synfig-studio/trunk/build_tools/autorevision.sh index 605f242..de4a5b6 100644 --- a/synfig-studio/trunk/build_tools/autorevision.sh +++ b/synfig-studio/trunk/build_tools/autorevision.sh @@ -25,7 +25,7 @@ get_git_id(){ BRANCH=${BRANCH#*/} fi export REVISION=`git show --pretty=format:%ci HEAD | head -c 10 | tr -d '-'` - export COMPARE="$1/.git/" + export COMPARE=`git rev-parse --git-dir` # The extra * at the end is for Modified #REVISION="$REVISION"`cd "$1"; [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"` } @@ -58,8 +58,8 @@ fi # Extract the revision from SVN/git/etc -if [ -e "$1/../../.git/refs/remotes/origin" ] ; then - get_git_id "$1/../.." +if git rev-parse --git-dir > /dev/null 2>&1 ; then + get_git_id "." elif [ -d "$1/.git/svn" ] ; then get_git_svn_id "$1" elif [ -d "$1/../.git/svn" ] ; then