fix: [installer] Options setting now works

pull/4152/head
Steve Clement 2019-02-10 22:01:56 +09:00
parent a1182d39ab
commit 19ac087bc0
3 changed files with 22 additions and 8 deletions

View File

@ -167,7 +167,6 @@ checkOpt () {
setOpt () {
options=()
for o in $@; do
option=$(
case "$o" in
("-c") echo "core"; CORE=1 ;;
("-V") echo "viper"; VIPER=1 ;;
@ -178,8 +177,7 @@ setOpt () {
("-C") echo "pre"; PRE=1 ;;
("-U") echo "unattended"; UNATTENDED=1 ;;
#(*) echo "$o is not a valid argument" ;;
esac)
options+=($option)
esac
done
}
@ -1606,7 +1604,7 @@ if [[ $0 == "./INSTALL.debian.tpl.sh" ]]; then
fi
debug "Checking for parameters or Kali Install"
if [[ $# -ne 1 && $0 != "/tmp/misp-kali.sh" ]]; then
if [[ $# == 0 && $0 != "/tmp/misp-kali.sh" ]]; then
usage
exit
else
@ -1623,6 +1621,15 @@ else
checkOpt unattended && echo "${GREEN}unattended${NC} install selected"
fi
echo "Core: $CORE"
echo "Viper: $VIPER"
echo "Modules: $MODULES"
echo "Dashboard: $DASBOARD"
echo "All: $ALL"
echo "Pre: $PRE"
echo "Mail2: $MAIL2"
echo "Unattended: $UNATTENDED"
debug "Checking flavour"
checkFlavour
debug "Setting MISP variables"

View File

@ -425,7 +425,7 @@ if [[ $0 == "./INSTALL.debian.tpl.sh" ]]; then
fi
debug "Checking for parameters or Kali Install"
if [[ $# -ne 1 && $0 != "/tmp/misp-kali.sh" ]]; then
if [[ $# == 0 && $0 != "/tmp/misp-kali.sh" ]]; then
usage
exit
else
@ -442,6 +442,15 @@ else
checkOpt unattended && echo "${GREEN}unattended${NC} install selected"
fi
echo "Core: $CORE"
echo "Viper: $VIPER"
echo "Modules: $MODULES"
echo "Dashboard: $DASBOARD"
echo "All: $ALL"
echo "Pre: $PRE"
echo "Mail2: $MAIL2"
echo "Unattended: $UNATTENDED"
debug "Checking flavour"
checkFlavour
debug "Setting MISP variables"

View File

@ -42,7 +42,6 @@ checkOpt () {
setOpt () {
options=()
for o in $@; do
option=$(
case "$o" in
("-c") echo "core"; CORE=1 ;;
("-V") echo "viper"; VIPER=1 ;;
@ -53,8 +52,7 @@ setOpt () {
("-C") echo "pre"; PRE=1 ;;
("-U") echo "unattended"; UNATTENDED=1 ;;
#(*) echo "$o is not a valid argument" ;;
esac)
options+=($option)
esac
done
}