summaryrefslogtreecommitdiff
path: root/scripts/rellns-sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/rellns-sh')
-rwxr-xr-xscripts/rellns-sh22
1 files changed, 7 insertions, 15 deletions
diff --git a/scripts/rellns-sh b/scripts/rellns-sh
index f1074339db..a57f601a90 100755
--- a/scripts/rellns-sh
+++ b/scripts/rellns-sh
@@ -1,6 +1,6 @@
-#! /bin/sh
+#!/bin/sh
# rellns-sh - Simplified ln program to generate relative symbolic link.
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2016 Free Software Foundation, Inc.
# Written by Ulrich Drepper <drepper@cygnus.com>, October 1996
#
# This program is free software; you can redistribute it and/or modify
@@ -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