Add a help message for options in install.sh

This commit is contained in:
Sylvain Tricot 2019-11-19 14:07:57 +01:00
parent a1fe98b7a3
commit d167bd9f75
2 changed files with 20 additions and 5 deletions

View File

@ -40,9 +40,7 @@ selfex: purge
@echo "Platforms:" >> pymsspec.lsm @echo "Platforms:" >> pymsspec.lsm
@echo "Copying-policy: Gnu Library General Public License (GLPL) 2.0" >> pymsspec.lsm @echo "Copying-policy: Gnu Library General Public License (GLPL) 2.0" >> pymsspec.lsm
@echo "End" >> pymsspec.lsm @echo "End" >> pymsspec.lsm
$(MAKESELF) --license ./license.txt --lsm ./pymsspec.lsm ./src $(SETUPFILE) "Python MsSpec" ./install.sh
$(MAKESELF) --license ./license.txt --lsm ./pymsspec.lsm --notemp ./src $(SETUPFILE) "Python MsSpec" ./install.sh
@mv ./src/msspec/version.py.bak ./src/msspec/version.py @mv ./src/msspec/version.py.bak ./src/msspec/version.py
@rm ./pymsspec.lsm @rm ./pymsspec.lsm

View File

@ -228,6 +228,16 @@ patience () {
${ECHO} "\b\b Done." ${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 () { local_install () {
# Initialize the install process # Initialize the install process
@ -307,8 +317,11 @@ local_install () {
## move the uninstal script ## move the uninstal script
#wrap "cp ./uninstall.sh ${DEST}" "Moving the uninstall script" #wrap "cp ./uninstall.sh ${DEST}" "Moving the uninstall script"
# #
# installation was a succes so move the logfile to the DEST directory # installation was a succes so ask if we keep the log file
#wrap "cp ${LOGFILE} ${DEST_FOLDER}/msspec_install.log" "Moving the logfile" read_yes_no "Do you wish to keep the log file (${LOGFILE})" "n"
if [ x"${ANSWER}" = "xn" ]; then
rm -f "${LOGFILE}"
fi
# self-explanatory # self-explanatory
success_message success_message
@ -327,6 +340,10 @@ do
;; ;;
d) export DEBUG="y" d) export DEBUG="y"
;; ;;
h) show_help
;;
*) show_help
;;
esac esac
done done