#
# Install a program, script, or datafile.
#
-# Copyright 2008-2009 by Apple Inc.
+# Copyright 2008-2012 by Apple Inc.
#
# This script is not compatible with BSD (or any other) install program, as it
# allows owner and group changes to fail with a warning and makes sure that the
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
+gzipprog="${GZIPPROG-gzip}"
transformbasename=""
transform_arg=""
dst=""
dir_arg=""
+gzipcp() {
+ # gzipcp from to
+ $gzipprog -9 <"$1" >"$2"
+}
+
while [ x"$1" != x ]; do
case $1 in
-c)
continue
;;
+ -z)
+ instcmd="gzipcp"
+ shift
+ continue
+ ;;
+
*)
if [ x"$src" = x ]; then
src="$1"
if [ x"$dir_arg" != x ]; then
dst="$src"
src=""
-
+
if [ -d "$dst" ]; then
instcmd=:
else
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
- # might cause directories to be created, which would be especially bad
+ # might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ ! -f "$src" -a ! -d "$src" ]; then
echo "install: $src does not exist"
exit 1
fi
-
+
if [ x"$dst" = x ]; then
echo "install: No destination specified"
exit 1