diff options
author | gjb <gjb@FreeBSD.org> | 2013-08-11 13:57:14 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2013-08-11 13:57:14 +0000 |
commit | 3a574dd0d6d6504922683480e277c174a98e68c2 (patch) | |
tree | 4d99d9a15331848b97104c58d651fc578751c371 /sys/conf | |
parent | 68b7f99701619961575786ae568adc85ad055d5c (diff) | |
download | FreeBSD-src-3a574dd0d6d6504922683480e277c174a98e68c2.zip FreeBSD-src-3a574dd0d6d6504922683480e277c174a98e68c2.tar.gz |
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
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/newvers.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index e1c4014..fc15a50 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -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 |