-
-
Save felipepodesta/ba8efdfc619568d0a969852f89f46ab8 to your computer and use it in GitHub Desktop.
bash boilerplate
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
#!/bin/bash | |
# set -o errexit | |
# set -o pipefail | |
# set -o nounset | |
# set -o xtrace | |
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")" | |
__base="$(basename ${__file} .sh)" | |
__root="$(cd "$(dirname "${__dir}")" && pwd)" | |
arg1="${1:-Unknow argument 1}" | |
# echo $LINENO | |
echo $arg1 | |
if [ $? -eq 0 ]; then | |
echo success | |
else | |
echo failure | |
exit 1 | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment