Handle files in the same directory correctly.

This commit is contained in:
Ulrich Drepper 1997-04-21 13:34:31 +00:00
parent b9b2307456
commit e2d554858b

View File

@ -27,7 +27,11 @@ if test -d $1; then
to=`cd $1 && /bin/pwd`
else
temp=`echo $1 | sed 's%/*[^/]*$%%'`
to=`cd $temp && /bin/pwd`
if test -z "$temp"; then
to=`/bin/pwd`
else
to=`cd $temp && /bin/pwd`
fi
to="$to/`echo $1 | sed 's%.*/\([^/][^/]*\)$%\1%'`"
fi
to=`echo $to | sed 's%^/%%'`