hotfix: Bugfixes to installer and loader

This commit is contained in:
2016-12-11 23:24:11 +01:00
parent 07101181c3
commit 6c5c558087
2 changed files with 20 additions and 4 deletions

View File

@ -59,7 +59,18 @@ function do_install {
if [ -f $1/hotfix ]; then
debug "Hotfix already installed, or at least something was found matching $1/hotfix"
debug "Nothing will be copied."
question "Do you want to overwrite $1/hotfix?"
echo -n " Overwrite? [y/N]: "
read CONFIRMATION
case "$CONFIRMATION" in
"y"|"Y"|"yes")
debug "Installing into $1"
cp hotfix $1/hotfix
;;
*)
debug "Not overwriting $1/hotfix"
;;
esac
else
debug "Installing into $1"
cp hotfix $1/hotfix
@ -101,9 +112,9 @@ fi
if [ ! -d $INSTALL_PATH ]; then
question "The directory $INSTALL_PATH does not exist. Do you want to create it?"
echo -n " Create directory? [Y/n]: "
read $CONFIRMATION
read CONFIRMATION
case "$CONFIRMATION" in
"n|N|no")
"n"|"N"|"no")
error "Directory not created. Aborting."
exit
;;