diff options
author | avg <avg@FreeBSD.org> | 2012-02-12 14:54:19 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2012-02-12 14:54:19 +0000 |
commit | 4855527852d195df9546266b5bb3d6fbe399c05b (patch) | |
tree | e7de54ad840436134f379554c5c11b104a5c101d | |
parent | eff2fef6c0e94f751ea562a9c314ef35aac0c020 (diff) | |
download | FreeBSD-src-4855527852d195df9546266b5bb3d6fbe399c05b.zip FreeBSD-src-4855527852d195df9546266b5bb3d6fbe399c05b.tar.gz |
newvers.sh: unbreak git/git-svn support
MFC after: 2 weeks
-rw-r--r-- | sys/conf/newvers.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 44d74fe..cd523ca 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -92,11 +92,15 @@ for dir in /bin /usr/bin /usr/local/bin; do svnversion=${dir}/svnversion break fi - if [ -d "${SYSDIR}/../.git" -a -x "${dir}/git" ] ; then - git_cmd="${dir}/git --git-dir=${SYSDIR}/../.git" - break - fi done +if [ -d "${SYSDIR}/../.git" ] ; then + for dir in /bin /usr/bin /usr/local/bin; do + if [ -x "${dir}/git" ] ; then + git_cmd="${dir}/git --git-dir=${SYSDIR}/../.git" + break + fi + done +fi if [ -n "$svnversion" ] ; then svn=`cd ${SYSDIR} && $svnversion` |