Add Solaris/linux support
[deliverable/binutils-gdb.git] / install.sh
index 2576817e3991f1d23d6931b713bcac5368f521f5..c92d510dd11b6aa07912dfa4731a8e216e8f9434 100755 (executable)
@@ -1,9 +1,7 @@
 #!/bin/sh
-set -e
-
 #
 # install - install a program, script, or datafile
-# This comes from X11R5; it is not part of GNU.
+# This comes from X11R5.
 #
 # $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
 #
@@ -29,10 +27,10 @@ stripprog="${STRIPPROG-strip}"
 rmprog="${RMPROG-rm}"
 mkdirprog="${MKDIRPROG-mkdir}"
 
-tranformbasename=""
+transformbasename=""
 transform_arg=""
 instcmd="$mvprog"
-chmodcmd=""
+chmodcmd="$chmodprog 0755"
 chowncmd=""
 chgrpcmd=""
 stripcmd=""
@@ -148,6 +146,8 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
 # Make sure that the destination directory exists.
 #  this part is taken from Noah Friedman's mkinstalldirs script
 
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
 defaultIFS='   
 '
 IFS="${IFS-${defaultIFS}}"
@@ -173,6 +173,7 @@ while [ $# -ne 0 ] ; do
 
        pathcomp="${pathcomp}/"
 done
+fi
 
 if [ x"$dir_arg" != x ]
 then
This page took 0.037637 seconds and 4 git commands to generate.