Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jun 2014 14:47:27 +0400
From:      Boris Samorodov <bsam@passap.ru>
To:        freebsd-arm@FreeBSD.org, kientzle@FreeBSD.org
Subject:   [crochet] Introduce SVN_CMD at lib/subversion.sh
Message-ID:  <53AD4BBF.9060202@passap.ru>

next in thread | raw e-mail | index | archive | help
Hi Tim, All!

Sometimes I use systems which have only svnlite version.
I propose a patch to let crochet work at those systems as well:
-----
--- lib/subversion.sh.orig  2014-03-30 13:28:41.000000000 +0400
+++ lib/subversion.sh       2014-06-27 14:37:01.668105743 +0400
@@ -1,15 +1,16 @@
+: ${SVN_CMD:=`which svn 2>/dev/null || which svnlite 2>/dev/null`}

 svn_update_sourcetree ( ) {
     echo "Updating source tree ${FREEBSD_SRC}"
     cd ${FREEBSD_SRC}
-    svn update > ${WORKDIR}/_.svnupdate.log
+    ${SVN_CMD} update > ${WORKDIR}/_.svnupdate.log
     cd ${TOPDIR}
 }

 svn_get_revision ( ) {
     _PWD=`pwd`
     cd ${FREEBSD_SRC}
-    SOURCE_VERSION=`svn info |grep Revision: |cut -c11-`
+    SOURCE_VERSION=`${SVN_CMD} info |grep Revision: |cut -c11-`
     cd $_PWD
     echo "Source version is: ${SOURCE_VERSION:-unknown}";
 }
-----

-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve



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