Skip to content

Instantly share code, notes, and snippets.

@daniel12fsp
Created July 21, 2020 19:54
Show Gist options
  • Save daniel12fsp/72104cc04a646a46ae65b16d1c9eb41c to your computer and use it in GitHub Desktop.
Save daniel12fsp/72104cc04a646a46ae65b16d1c9eb41c to your computer and use it in GitHub Desktop.

Revisions

  1. daniel12fsp created this gist Jul 21, 2020.
    19 changes: 19 additions & 0 deletions template.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    #!/bin/sh
    set -x
    set -e

    trap 'catch' ERR
    catch() {
    echo "An error has occurred =("
    exit 1
    }

    case "$1" in
    init)

    ;;

    *)
    echo "Command not found"
    ;;
    esac