document bfdsumm.texi
[deliverable/binutils-gdb.git] / install.sh
index 53f7450dfad4696f9434cac2593bef23feece521..6e92d0b534d822a659f76ad8e801b0c53ee5c428 100755 (executable)
@@ -78,6 +78,8 @@ while [ x"$1" != x ]; do
            then
                src=$1
            else
+               # this colon is to work around a 386BSD /bin/sh bug
+               :
                dst=$1
            fi
            shift
@@ -114,8 +116,10 @@ fi
 
 # Make a temp file name in the proper directory.
 
-dstdir=`dirname $dst`
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
 dsttmp=$dstdir/#inst.$$#
+trap "rm -f ${dsttmp}" 0
 
 # Make sure that the destination directory exists.
 #  this part is taken from Noah Friedman's mkinstalldirs script
@@ -152,7 +156,7 @@ if [ x"$transformarg" = x ]
 then
        dstfile=`basename $dst`
 else
-       dstfile=`basename $dst $transformbasename | sed -e $transformarg`
+       dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename
 fi
 
 # don't allow the sed command to completely eliminate the filename
This page took 0.024159 seconds and 4 git commands to generate.