commit 2ba92c891bf0d90ed7300efc419e85bdd7a36a1b parent 9fae66ba9066b903be97879cc6546e6accad3e30 Author: regexghost <dev@regexghost.com> Date: Fri, 29 May 2026 21:48:07 +0100 Added command case statement and bug fix Diffstat:
| M | bug.sh | | | 39 | +++++++++++++++++++++++++++++++++++++-- |
1 file changed, 37 insertions(+), 2 deletions(-)
diff --git a/bug.sh b/bug.sh @@ -81,7 +81,7 @@ lineToFile () { touch /tmp/bug_todo_temp echo "ID: ${id}" >> /tmp/bug_todo_temp - echo "Priority: ${priority}" >> /tmp/bug_todo_temp + echo "Priority: ${prior}" >> /tmp/bug_todo_temp echo "State: ${state}" >> /tmp/bug_todo_temp echo "Subject: ${subject}" >> /tmp/bug_todo_temp echo "-- Description Below --" >> /tmp/bug_todo_temp @@ -127,4 +127,39 @@ list () { echo "$output" } -list +CMD="$1" + +case "$CMD" in + -h) + printHelp + exit 1 + ;; + a*) + add || exit 1 + ;; + l*) + list || exit 1 + ;; + ver*) + version || exit 1 + ;; + v*) + view || exit 1 + ;; + p*) + echo Project: "$BUG_PROJECT" + ;; + del*) + delete || exit 1 + ;; + create) + create || exit 1 + ;; + e*) + edit || exit 1 + ;; + *) + printHelp + exit 1 + ;; +esac