diff --git a/usr/local/share/bastille/create.sh b/usr/local/share/bastille/create.sh index a92df02..6204b6f 100644 --- a/usr/local/share/bastille/create.sh +++ b/usr/local/share/bastille/create.sh @@ -391,11 +391,11 @@ else ## handle single options case "${1}" in -T|--thick|thick) - shift 1 + shift THICK_JAIL="1" ;; -V|--vnet|vnet) - shift 1 + shift VNET_JAIL="1" ;; -*) diff --git a/usr/local/share/bastille/destroy.sh b/usr/local/share/bastille/destroy.sh index cffd83f..9f80655 100644 --- a/usr/local/share/bastille/destroy.sh +++ b/usr/local/share/bastille/destroy.sh @@ -152,29 +152,30 @@ help|-h|--help) ;; esac -OPTION="${1}" -TARGET="${2}" +## reset this options +FORCE="" ## handle additional options -case "${OPTION}" in --f|--force) - if [ $# -gt 2 ] || [ $# -lt 2 ]; then +case "${1}" in + -f|--force|force) + FORCE="1" + shift + ;; + -*) + echo -e "${COLOR_RED}Unknown Option.${COLOR_RESET}" usage - fi - FORCE="1" - ;; --*) - echo -e "${COLOR_RED}Unknown Option.${COLOR_RESET}" - usage - ;; -*) - if [ $# -gt 1 ] || [ $# -lt 1 ]; then - usage - fi - TARGET="${1}" - ;; + ;; + *) + break + ;; esac +TARGET="${1}" + +if [ $# -gt 1 ] || [ $# -lt 1 ]; then + usage +fi + ## check what should we clean case "${TARGET}" in *-RELEASE|*-release|*-RC1|*-rc1|*-RC2|*-rc2)