Update convert.sh

This commit is contained in:
tschettervictor
2025-05-23 09:26:43 -06:00
committed by GitHub
parent e2dd2280de
commit 5118ee1ab0

View File

@@ -39,6 +39,7 @@ usage() {
Options:
-a | --auto Auto mode. Start/stop jail(s) if required.
-y | --yes Do not prompt. Just convert.
-x | --debug Enable debug mode.
EOF
@@ -47,6 +48,7 @@ EOF
# Handle options.
AUTO=0
AUTO_YES=0
while [ "$#" -gt 0 ]; do
case "${1}" in
-h|--help|help)
@@ -56,6 +58,10 @@ while [ "$#" -gt 0 ]; do
AUTO=1
shift
;;
-y|--yes)
AUTO_YES=1
shift
;;
-x|--debug)
enable_debug
shift
@@ -64,6 +70,7 @@ while [ "$#" -gt 0 ]; do
for _opt in $(echo ${1} | sed 's/-//g' | fold -w1); do
case ${_opt} in
a) AUTO=1 ;;
y) AUTO_YES=1 ;;
x) enable_debug ;;
*) error_exit "[ERROR]: Unknown Option: \"${1}\"" ;;
esac