diff --git a/Makefile b/Makefile index de47215..59531f2 100644 --- a/Makefile +++ b/Makefile @@ -40,9 +40,7 @@ selfex: purge @echo "Platforms:" >> pymsspec.lsm @echo "Copying-policy: Gnu Library General Public License (GLPL) 2.0" >> pymsspec.lsm @echo "End" >> pymsspec.lsm - - - $(MAKESELF) --license ./license.txt --lsm ./pymsspec.lsm --notemp ./src $(SETUPFILE) "Python MsSpec" ./install.sh + $(MAKESELF) --license ./license.txt --lsm ./pymsspec.lsm ./src $(SETUPFILE) "Python MsSpec" ./install.sh @mv ./src/msspec/version.py.bak ./src/msspec/version.py @rm ./pymsspec.lsm diff --git a/src/install.sh b/src/install.sh index 3907ccd..f1bad36 100755 --- a/src/install.sh +++ b/src/install.sh @@ -228,6 +228,16 @@ patience () { ${ECHO} "\b\b Done." } +show_help () { + echo "Usage: $SCRIPT_NAME [OPTIONS]" + echo "List of possible options:" + echo " -p FOLDER Default FOLDER for installation." + echo " -b FOLDER Default FOLDER for binaries." + echo " -y Accept all default choices." + echo " -d Debug mode." + echo " -h Show this message." + exit 0 +} local_install () { # Initialize the install process @@ -307,8 +317,11 @@ local_install () { ## move the uninstal script #wrap "cp ./uninstall.sh ${DEST}" "Moving the uninstall script" # - # installation was a succes so move the logfile to the DEST directory - #wrap "cp ${LOGFILE} ${DEST_FOLDER}/msspec_install.log" "Moving the logfile" + # installation was a succes so ask if we keep the log file + read_yes_no "Do you wish to keep the log file (${LOGFILE})" "n" + if [ x"${ANSWER}" = "xn" ]; then + rm -f "${LOGFILE}" + fi # self-explanatory success_message @@ -327,6 +340,10 @@ do ;; d) export DEBUG="y" ;; + h) show_help + ;; + *) show_help + ;; esac done