summaryrefslogtreecommitdiffstats
path: root/install-sh
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2006-11-15 17:17:39 +0000
committerRich Megginson <rmeggins@redhat.com>2006-11-15 17:17:39 +0000
commita269b9cabbf0e5fc8a5ff8f8d9becba784879ba0 (patch)
treecd868c366b937992a5601aee8e1070f1654e66fc /install-sh
parentb45519e60e6b6461c97163780534df715dc1a2b5 (diff)
downloadds-a269b9cabbf0e5fc8a5ff8f8d9becba784879ba0.tar.gz
ds-a269b9cabbf0e5fc8a5ff8f8d9becba784879ba0.tar.xz
ds-a269b9cabbf0e5fc8a5ff8f8d9becba784879ba0.zip
Resolves: bug 215669
Bug Description: Define LIBDIR, BINDIR, etc. in Makefile Reviewed by: nkinder (Thanks!) Fix Description: The paths LIBDIR, BINDIR, et. al. are #define'd in create_instance.h to hard coded values. We should be able to set these values in configure and override the built in values. We can't simply set them via AC_DEFINE in configure.ac because we are using config.h and this would render the definition like this: #define BINDIR "${exec_prefix}/bin" instead of #define BINDIR "/usr/bin" So we instead define them in Makefile.am and add their definitions to AM_CPPFLAGS, and quote them properly to make sure the value includes the quotation marks when expanded in the C code. I tested this with both an rpmbuild and a regular developer type build. Platforms tested: RHEL4/FC5 Flag Day: no Doc impact: no
Diffstat (limited to 'install-sh')
-rwxr-xr-xinstall-sh17
1 files changed, 9 insertions, 8 deletions
diff --git a/install-sh b/install-sh
index dd97db7a..4d4a9519 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2004-09-10.20
+scriptversion=2005-05-14.22
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -109,7 +109,7 @@ while test -n "$1"; do
shift
continue;;
- --help) echo "$usage"; exit 0;;
+ --help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2"
shift
@@ -134,7 +134,7 @@ while test -n "$1"; do
shift
continue;;
- --version) echo "$0 $scriptversion"; exit 0;;
+ --version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
@@ -213,7 +213,7 @@ do
fi
# This sed command emulates the dirname command.
- dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+ dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
# Make sure that the destination directory exists.
@@ -226,7 +226,8 @@ do
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
- set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ shift
IFS=$oIFS
pathcomp=
@@ -295,7 +296,7 @@ do
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
- (exit 1); exit
+ (exit 1); exit 1
}
else
:
@@ -306,12 +307,12 @@ do
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
- fi || { (exit 1); exit; }
+ fi || { (exit 1); exit 1; }
done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
- (exit 0); exit
+ (exit 0); exit 0
}
# Local variables: