From owner-svn-src-all@FreeBSD.ORG Tue Jul 2 10:36:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1D6984CC; Tue, 2 Jul 2013 10:36:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0FD361336; Tue, 2 Jul 2013 10:36:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r62Aavnx095104; Tue, 2 Jul 2013 10:36:57 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r62AavQg095103; Tue, 2 Jul 2013 10:36:57 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201307021036.r62AavQg095103@svn.freebsd.org> From: Glen Barber Date: Tue, 2 Jul 2013 10:36:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252505 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2013 10:36:58 -0000 Author: gjb Date: Tue Jul 2 10:36:57 2013 New Revision: 252505 URL: http://svnweb.freebsd.org/changeset/base/252505 Log: - 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) Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Tue Jul 2 08:44:56 2013 (r252504) +++ head/sys/conf/newvers.sh Tue Jul 2 10:36:57 2013 (r252505) @@ -88,16 +88,26 @@ v=`cat version` u=${USER:-root} d=`pwd` 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