Author: gjb
Date: Sun Aug 11 13:57:14 2013
New Revision: 254217
URL: http://svnweb.freebsd.org/changeset/base/254217

Log:
  Use realpath(1) to determine the location of the newvers.sh script,
  since the current working directory might not be what is expected,
  causing svn{,lite}version to fail to find ${0} (itself).
  
  Submitted by: Dan Mack

Modified:
  head/sys/conf/newvers.sh

Modified: head/sys/conf/newvers.sh
==============================================================================
--- head/sys/conf/newvers.sh    Sun Aug 11 11:33:48 2013        (r254216)
+++ head/sys/conf/newvers.sh    Sun Aug 11 13:57:14 2013        (r254217)
@@ -96,7 +96,7 @@ for dir in /usr/bin /usr/local/bin; do
                # Run svnversion from ${dir} on this script; if return code
                # is not zero, the checkout might not be compatible with the
                # svnversion being used.
-               ${dir}/svnversion $(basename ${0}) >/dev/null 2>&1
+               ${dir}/svnversion $(realpath ${0}) >/dev/null 2>&1
                if [ $? -eq 0 ]; then
                        svnversion=${dir}/svnversion
                        break
@@ -105,7 +105,7 @@ for dir in /usr/bin /usr/local/bin; do
 done
 
 if [ -z "${svnversion}" ] && [ -x /usr/bin/svnliteversion ] ; then
-       /usr/bin/svnliteversion $(basename ${0}) >/dev/null 2>&1
+       /usr/bin/svnliteversion $(realpath ${0}) >/dev/null 2>&1
        if [ $? -eq 0 ]; then
                svnversion=/usr/bin/svnliteversion
        else
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to