Teach beinstall to use and prefer svnlite, with a fallback to svn.

Approved by:	will
This commit is contained in:
Brad Davis 2017-10-18 15:48:26 +00:00
parent 46fcd1af63
commit 1ff30c6af0

View File

@ -106,7 +106,13 @@ if [ -d .git ] ; then
[ $? -ne 0 ] && errx "Can't lookup git commit timestamp"
commit_ts=$(date -r ${commit_time} '+%Y%m%d.%H%M%S')
elif [ -d .svn ] ; then
commit_ts=$( svn info | awk '/Last Changed Date/ {print $4 "." $5}' | tr -d :- )
if [ -f /usr/bin/svnlite ]; then
commit_ts=$( svnlite info --show-item last-changed-date | sed -e 's/\..*//' -e 's/T/./' -e 's/-//g' -e s'/://g' )
elif [ -f /usr/local/bin/svn ]; then
commit_ts=$( svn info --show-item last-changed-date | sed -e 's/\..*//' -e 's/T/./' -e 's/-//g' -e s'/://g' )
else
errx "Can't lookup Subversion commit timestamp"
fi
[ $? -ne 0 ] && errx "Can't lookup Subversion commit timestamp"
else
errx "Unable to determine sandbox type"