Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Oct 2017 15:48:26 +0000 (UTC)
From:      Brad Davis <brd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r324723 - head/tools/build
Message-ID:  <201710181548.v9IFmQlw010840@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brd (doc,ports committer)
Date: Wed Oct 18 15:48:26 2017
New Revision: 324723
URL: https://svnweb.freebsd.org/changeset/base/324723

Log:
  Teach beinstall to use and prefer svnlite, with a fallback to svn.
  
  Approved by:	will

Modified:
  head/tools/build/beinstall.sh

Modified: head/tools/build/beinstall.sh
==============================================================================
--- head/tools/build/beinstall.sh	Wed Oct 18 15:38:05 2017	(r324722)
+++ head/tools/build/beinstall.sh	Wed Oct 18 15:48:26 2017	(r324723)
@@ -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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710181548.v9IFmQlw010840>