Last active
October 11, 2020 09:20
-
-
Save Kreyren/4fc76d929efbea1bc874760e7f78c810 to your computer and use it in GitHub Desktop.
This file contains 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/busybox sh | |
# Created by Jacob Hrbek <[email protected]> under GPLv3 <https://www.gnu.org/licenses/gpl-3.0.en.html> with the help in freenode.net/#bash in 28/05/2020 11:09 CET | |
# shellcheck shell=sh | |
set -e | |
die() { | |
case "$2" in | |
*) printf 'FATAL: %s\n' "$3 $1" | |
esac | |
exit "$2" | |
} | |
# NOTICE(Krey): It ain't stupid if it works! | |
alias die='die "at line $LINENO"' | |
die 1 "hello" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment