From e2d554858b9a291fb9b9515ed5f8dbc850d7ea11 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 21 Apr 1997 13:34:31 +0000 Subject: [PATCH] Handle files in the same directory correctly. --- rellns-sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rellns-sh b/rellns-sh index e66010d513..890f4eea3a 100755 --- a/rellns-sh +++ b/rellns-sh @@ -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%^/%%'`