mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
SVK detection on Windows is not trivial :-)
Patch from Daniel Harding. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17120 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
+13
-4
@@ -54,22 +54,31 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $OSTYPE == "msys"
|
||||
then
|
||||
svk_name="svk.bat"
|
||||
svk_cmd="cmd \/c svk"
|
||||
else
|
||||
svk_name="svk"
|
||||
svk_cmd="svk"
|
||||
fi
|
||||
|
||||
# Maybe it's SVK? First, check if we've got 'svk' in the path. If not,
|
||||
# then exit with an error code of 1..
|
||||
which svk >/dev/null 2>&1
|
||||
which $svk_name >/dev/null 2>&1
|
||||
if test $? != 0 ; then exit 1 ; fi
|
||||
|
||||
# Okay, we have 'svk'. Now see if $real_srcdir is an svk checkout
|
||||
# Note that the 'echo n' is to protect against having svk installed
|
||||
# without having configured the depotmap.
|
||||
svkinfo=`echo n | svk info "$real_srcdir" 2>&1`
|
||||
svkinfo=`echo n | $svk_cmd info "$real_srcdir" 2>&1`
|
||||
if test $? != 0 ; then exit 1 ; fi
|
||||
|
||||
# If we got here, then $real_srcdir is an svk checkout. Parse out
|
||||
# the revision info, print it out, and then output 0. Just combine
|
||||
# all the revision numbers into a single string by combining them
|
||||
# with periods.
|
||||
svkinfo=`svk info "$real_srcdir" | grep Rev | head -5 | sed -e 's/^.* \([0-9:]*\)$/\1/'`
|
||||
echo $svkinfo | sed -e 's/\s/./g'
|
||||
svkinfo=`$svk_cmd info "$real_srcdir" | grep Rev | head -5 | sed -e 's/^.* \([0-9:]*\)$/\1/'`
|
||||
echo $svkinfo | sed -e 's/ /./g'
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user