From f897f2aa7055c493db6391c50c8d19da970078e8 Mon Sep 17 00:00:00 2001 From: Andreas Brachold Date: Tue, 19 Jul 2005 15:09:05 +0000 Subject: Initial import with release 0.2.3 --- contrib/install-scripts.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 contrib/install-scripts.sh (limited to 'contrib/install-scripts.sh') 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." -- cgit v1.2.3