From 1ff30c6af03e41949ff486b2c0919f01dd231649 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Wed, 18 Oct 2017 15:48:26 +0000 Subject: [PATCH] Teach beinstall to use and prefer svnlite, with a fallback to svn. Approved by: will --- tools/build/beinstall.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/build/beinstall.sh b/tools/build/beinstall.sh index 0467ce0e0ed3..94b25c59af24 100755 --- a/tools/build/beinstall.sh +++ b/tools/build/beinstall.sh @@ -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"