aboutsummaryrefslogtreecommitdiff
path: root/sys/conf/newvers.sh
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2013-07-02 10:36:57 +0000
committerGlen Barber <gjb@FreeBSD.org>2013-07-02 10:36:57 +0000
commit92994bd3baae0897ee9852bed803566c419f2c49 (patch)
treedc7c4622581638ac4548ee592ff49975d83f7d75 /sys/conf/newvers.sh
parent92a0637f73f39b32c57fb47d38ee2ce29e836d12 (diff)
downloadsrc-92994bd3baae0897ee9852bed803566c419f2c49.tar.gz
src-92994bd3baae0897ee9852bed803566c419f2c49.zip
- Update newvers.sh to include svn revision in uname(1) if the
system has svnliteversion. - If svnliteversion is not found, look for svnversion in /usr/bin and /usr/local/bin, since svnlite can be installed as svn if WITH_SVN is set.[1] - Remove /bin from binary search paths.[1] Discussed with: kib [1] MFC after: 3 days Approved by: kib (mentor)
Notes
Notes: svn path=/head/; revision=252505
Diffstat (limited to 'sys/conf/newvers.sh')
-rw-r--r--sys/conf/newvers.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 1e5e24bdc6f0..b0ca002b1867 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -88,16 +88,26 @@ v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date`
i=`${MAKE:-make} -V KERN_IDENT`
compiler_v=$($(${MAKE:-make} -V CC) -v 2>&1 | grep 'version')
-for dir in /bin /usr/bin /usr/local/bin; do
+if [ -x /usr/bin/svnliteversion ] ; then
+ svnversion=/usr/bin/svnliteversion
+fi
+
+for dir in /usr/bin /usr/local/bin; do
+ if [ ! -z "${svnversion}" ] ; then
+ break
+ fi
if [ -x "${dir}/svnversion" ] && [ -z ${svnversion} ] ; then
svnversion=${dir}/svnversion
+ break
fi
+done
+for dir in /usr/bin /usr/local/bin; do
if [ -x "${dir}/p4" ] && [ -z ${p4_cmd} ] ; then
p4_cmd=${dir}/p4
fi
done
if [ -d "${SYSDIR}/../.git" ] ; then
- for dir in /bin /usr/bin /usr/local/bin; do
+ for dir in /usr/bin /usr/local/bin; do
if [ -x "${dir}/git" ] ; then
git_cmd="${dir}/git --git-dir=${SYSDIR}/../.git"
break