Fix poor-man's dirname implementation. Reported by Matías A. Fonzo.
authorlxoliva <lxoliva@559672b5-ba27-0410-b829-e8f1faed8b1b>
Tue, 31 Mar 2009 18:43:31 +0000 (18:43 +0000)
committerlxoliva <lxoliva@559672b5-ba27-0410-b829-e8f1faed8b1b>
Tue, 31 Mar 2009 18:43:31 +0000 (18:43 +0000)
git-svn-id: http://www.fsfla.org/svn/fsfla/software/linux-libre/scripts@4811 559672b5-ba27-0410-b829-e8f1faed8b1b

deblob-main

index 71840776c75f2fedd484c7550328ad4a69bba41d..51e232a13691f854a3836effa28abdeb7c373a6a 100755 (executable)
@@ -63,7 +63,7 @@ esac
 
 mver=$1 extra=$2 sver=$3
 kver=$mver$sver libre=libre$extra
-deblob= dir=`echo $0 | sed 's,/[^/]*$,,'`
+deblob= dir=`echo "$0" | sed 's,[^/]*$,,;s,^$,.,;s,/*$,,'`
 
 if test ! -f linux-$kver.tar.bz2; then
   echo linux-$kver.tar.bz2 does not exist >&2