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.
Bash template
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment