Update of /cvsroot/libfunutil/libfunutil/toc/bin
In directory sc8-pr-cvs1:/tmp/cvs-serv20955/toc/bin
Modified Files:
install-sh
Log Message:
cygwin-related workarounds: try to handle .exe files properly and quotes $src, so hopefully files with spaces in the names are okay.
Index: install-sh
===================================================================
RCS file: /cvsroot/libfunutil/libfunutil/toc/bin/install-sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- install-sh 28 Aug 2003 23:07:57 -0000 1.1
+++ install-sh 31 Aug 2003 20:28:42 -0000 1.2
@@ -112,8 +112,16 @@
true
fi
+# cygwin workaround: added by st...@wa... for use with toc.
+if [ -f "$src".exe ] ; then
+ src="$src.exe"
+ dst_suffix=".exe"
+ echo CYGWIN WORKAROUND: src=$src
+fi
+
+
if [ x"$dir_arg" != x ]; then
- dst=$src
+ dst="$src"
src=""
if [ -d $dst ]; then
@@ -128,12 +136,12 @@
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
- if [ -f $src -o -d $src ]
+ if [ -f "$src" -o -d "$src" ]
then
true
else
- echo "install: $src does not exist"
- exit 1
+ echo "install: $src does not exist"
+ exit 1
fi
if [ x"$dst" = x ]
@@ -149,7 +157,7 @@
if [ -d $dst ]
then
- dst="$dst"/`basename $src`
+ dst="$dst"/`basename "$src"`
else
true
fi
@@ -190,6 +198,12 @@
done
fi
+# cygwin workaround:
+if [ x"$dst_suffix" != x ]; then
+ dst="$dst$dst_suffix"
+ echo "CYGWIN WORKAROUND? dst=$dst"
+fi
+
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
@@ -225,7 +239,7 @@
# Move or copy the file name to the temp name
- $doit $instcmd $src $dsttmp &&
+ $doit $instcmd "$src" $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
|