From 1cafd147ff22274e850c742fef408c887018596e Mon Sep 17 00:00:00 2001 From: "Eshan Roy (Eshanized)" Date: Thu, 7 Mar 2024 23:26:05 +0530 Subject: [PATCH] @eshanized: push via script --- common/snigdhaos-libs/exec-terminal | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 +