summaryrefslogtreecommitdiff
path: root/contrib/install-scripts.sh
diff options
context:
space:
mode:
authorAndreas Brachold <vdr07@deltab.de>2005-07-19 15:09:05 +0000
committerAndreas Brachold <vdr07@deltab.de>2005-07-19 15:09:05 +0000
commitf897f2aa7055c493db6391c50c8d19da970078e8 (patch)
treed13a515b24c149d7da4e9828cc9e9c73d4916f00 /contrib/install-scripts.sh
downloadvdr-plugin-image-f897f2aa7055c493db6391c50c8d19da970078e8.tar.gz
vdr-plugin-image-f897f2aa7055c493db6391c50c8d19da970078e8.tar.bz2
Initial import with release 0.2.3
Diffstat (limited to 'contrib/install-scripts.sh')
-rwxr-xr-xcontrib/install-scripts.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/contrib/install-scripts.sh b/contrib/install-scripts.sh
new file mode 100755
index 0000000..8f2d34d
--- /dev/null
+++ b/contrib/install-scripts.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+#set -xv
+pushd $(dirname $0) &>/dev/null
+
+BIN_FILES="../scripts/imageplugin.sh ../contrib/image_pregen.sh"
+BIN_DEST="/usr/bin"
+
+echo -e "Warning: this script will install these files:\n$BIN_FILES\nto $BIN_DEST,\npress CTRL-C to abort, or anykey to begin."
+read ANYKEY
+
+#installing bin files
+echo "Installing $BIN_FILES to $BIN_DEST....."
+for FILE in $BIN_FILES
+do
+ echo "copying $FILE to $BIN_DEST ..."
+ rm -f $BIN_DEST/$FILE
+ cp -f $FILE $BIN_DEST/$FILE;RV=$?
+ [ $RV -ne 0 ] && echo -e "Errorcode $RV on file: $BIN_DEST/$FILE.\n"
+done
+
+#check and install mount.sh
+if $(which mount.sh &>/dev/null)
+ then
+ OLD_MOUNT=$(which mount.sh)
+ echo -e "Should the existing mount.sh ("$OLD_MOUNT")\nbe overwriten? (y/N)"
+ read -n 1 -t 90 $KEYPRESSED
+ [ "z$KEYPRESSED" = "zy" -o "z$KEYPRESSED" = "zY" ] && rm -f $OLD_MOUNT && cp -f ../scripts/mount.sh $OLD_MOUNT
+ else
+ cp ../scripts/mount.sh $BIN_DEST/mount.sh
+fi
+
+which mount.sh &>/dev/null || echo -e "Error could not execute mount.sh, please check.\n"
+
+popd &>/dev/null &>/dev/null
+echo -e "Remember to copy/create imagesources.conf and imagecmds.conf\nfiles in your plugins config directory."