aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-12-02 23:58:15 -0500
committerCarlos O'Donell <carlos@systemhalted.org>2015-12-02 23:58:15 -0500
commitdb340c904dd519142025a09190bf48ad28152ab9 (patch)
tree9e206d2550232fbcb418b42cdc42df548993be94 /scripts
parent4de3b51e08cd7585926406b06da113d1173075c3 (diff)
downloadglibc-db340c904dd519142025a09190bf48ad28152ab9.zip
glibc-db340c904dd519142025a09190bf48ad28152ab9.tar.gz
glibc-db340c904dd519142025a09190bf48ad28152ab9.tar.bz2
Use shell's builtin pwd.
Insisting on /bin/pwd is unnecessary nowadays. Autoconf-generated scripts have been using the shell's built-in "pwd" for a long time.`
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/rellns-sh18
1 files changed, 5 insertions, 13 deletions
diff --git a/scripts/rellns-sh b/scripts/rellns-sh
index f107433..9c733b5 100755
--- a/scripts/rellns-sh
+++ b/scripts/rellns-sh
@@ -30,23 +30,15 @@ if test $# -ne 2; then
exit 1
fi
-if test -x /bin/pwd; then
- pwd=/bin/pwd
-elif test -x /usr/bin/pwd; then
- pwd=/usr/bin/pwd
-else
- pwd='pwd'
-fi
-
# Make both paths absolute.
if test -d $1; then
- to=`cd $1 && $pwd`
+ to=`cd $1 && pwd -P`
else
temp=`echo $1 | sed 's%/*[^/]*$%%'`
if test -z "$temp"; then
- to=`$pwd`
+ to=`pwd -P`
else
- to=`cd $temp && $pwd`
+ to=`cd $temp && pwd -P`
fi
to="$to/`echo $1 | sed 's%.*/\([^/][^/]*\)$%\1%'`"
fi
@@ -59,9 +51,9 @@ else
fi
if test -z "$from"; then
- from=`$pwd | sed 's%^/%%'`
+ from=`pwd -P | sed 's%^/%%'`
else
- from=`cd $from && $pwd | sed 's%^/%%'`
+ from=`cd $from && pwd -P | sed 's%^/%%'`
fi
while test -n "$to" && test -n "$from"; do