Created
October 27, 2022 18:34
-
-
Save johnpena/b4affeeb3bebb26a4ef54e1a7a15b88f to your computer and use it in GitHub Desktop.
template.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
if [[ "${TRACE-0}" == "1" ]]; then | |
set -o xtrace | |
fi | |
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then | |
echo 'Usage: ./script.sh arg-one arg-two | |
This is a longer description of the script. | |
' | |
exit | |
fi | |
cd "$(dirname "$0")" | |
main() { | |
echo 'hello, script' | |
} | |
# run the main function with all args | |
main "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment