openldap/build/install-sh
Kurt Zeilenga 01cd11c308 Move install.sh to install-sh. install.sh name may cause problems
with some 'make' programs that have a rule to create 'install' from
it there is no 'Makefile'.  (per autoconf 2.12).
1999-01-25 02:30:58 +00:00

46 lines
539 B
Bash
Executable File

#!/bin/sh
# simple BSD-like install replacement
#
# Copyright (c) 1994 The Regents of the University of Michigan
#
MODE=0755
USAGE="usage: $0 [-c] [-m mode] file dir"
while [ $# != 0 ]; do
case "$1" in
-c)
;;
-m)
MODE=$2
shift
;;
-*)
echo "$USAGE"
exit 1
;;
*)
break
;;
esac
shift
done
if [ $# != 2 ]; then
echo "$USAGE"
exit 1
fi
FILE=$1
DIR=$2
cp $FILE $DIR
if [ -d $DIR ]; then
chmod $MODE $DIR/`basename $FILE`
else
#
# DIR is really the destination file
#
chmod $MODE $DIR
fi