mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-27 03:20:22 +08:00
01cd11c308
with some 'make' programs that have a rule to create 'install' from it there is no 'Makefile'. (per autoconf 2.12).
46 lines
539 B
Bash
Executable File
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
|