diff --git a/common/snigdhaos-libs/exec-terminal b/common/snigdhaos-libs/exec-terminal index ad66c9bd..a74e45c2 100644 --- a/common/snigdhaos-libs/exec-terminal +++ b/common/snigdhaos-libs/exec-terminal @@ -1,3 +1,24 @@ #!/bin/bash set -e +LAUNCH_TERMINAL_SHELL=bash + +usage(){ + echo "Usage: ${0##*/} [cmd]" + echo " -s [shell] changes the shell to [shell]" + echo ' -h This help' + exit 1 +} + +opts='s:h' + +while getopts "${opts}" arg; do + case "${arg}" in + s) LAUNCH_TERMINAL_SHELL="$OPTARGS" ;; + h | ?) usage 0 ;; + *) + echo "Invalid arguments '${arg}'" + usage 1 ;; + esac +done +