# Copyright (c) 1998, 1999, 2001 Proofpoint, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
# $Id: install.sh,v 8.15 2013-11-22 20:51:25 ca Exp $
# Set default program
owner=""
group=""
mode=""
strip=""
then
then
else
fi
# Check arguments
while [ ! -z "$1" ]
do
case $1
-o) owner=$2
shift; shift
;;
-g) group=$2
shift; shift
;;
-m) mode=$2
shift; shift
;;
shift
;;
-s) strip="strip"
shift
;;
exit 1
;;
*) break
;;
esac
done
# Check source file
if [ -z "$1" ]
then
echo "Source file required" >&2
exit 1
then
src=$1
else
exit 1
fi
# Check destination
if [ -z "$2" ]
then
echo "Destination required" >&2
exit 1
elif [ -d $2 ]
then
else
dst=$2
fi
# Do install operation
if [ $? != 0 ]
then
exit 1
fi
# Strip if requested
if [ ! -z "$strip" ]
then
fi
# Change owner if requested
if [ ! -z "$owner" ]
then
if [ $? != 0 ]
then
exit 1
fi
fi
# Change group if requested
if [ ! -z "$group" ]
then
if [ $? != 0 ]
then
exit 1
fi
fi
# Change mode if requested
if [ ! -z "$mode" ]
then
if [ $? != 0 ]
then
exit 1
fi
fi
exit 0