summaryrefslogtreecommitdiff
path: root/install-script
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-29 20:07:38 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-29 20:07:38 +0000
commitd6bb55476c9aa4771e2b7f24cee05325a1df4117 (patch)
treeed830d3c2c748f4c1ed6de25922461d701a805de /install-script
parent0bb13ddf57c968db37a997851650d768641b3528 (diff)
Revived Autotools from the grave, although it'll need some tweaking to work alongside CMake now. (In other words, don't use this commit, I committed this so I don't have to re-add these files again if I screw something up.)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1876 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'install-script')
-rw-r--r--install-script29
1 files changed, 29 insertions, 0 deletions
diff --git a/install-script b/install-script
new file mode 100644
index 000000000..aeb6d3352
--- /dev/null
+++ b/install-script
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+SRC= ; DEST= ; MODE= ; USER= ; GROUP= ; export SRC DEST MODE USER GROUP
+while [ $# -gt 0 ] ; do
+ case $1 in
+ -m) MODE=$2; shift; shift;;
+ -u) USER=$2; shift; shift;;
+ -g) GROUP=$2; shift; shift;;
+ -c) shift;;
+ *) SRC="$DEST"; DEST="$1"; shift;;
+ esac
+done
+if [ ! "$DEST" ] ; then
+ echo >&2 "Usage: $0 [-c] [-m mode] [-u user] [-g group] source dest"
+ exit 1
+fi
+if [ -d "$DEST" ] ; then
+ DEST="$DEST/$SRC"
+fi
+/bin/cp -p "$SRC" "$DEST"
+if [ "$MODE" ] ; then
+ /bin/chmod $MODE "$DEST"
+fi
+if [ "$USER" ] ; then
+ /bin/chown "$USER" "$DEST"
+fi
+if [ "$GROUP" ] ; then
+ /bin/chgrp "$GROUP" "$DEST"
+fi