Skip to content

Instantly share code, notes, and snippets.

@Kreyren
Last active October 11, 2020 09:20
Show Gist options
  • Save Kreyren/4fc76d929efbea1bc874760e7f78c810 to your computer and use it in GitHub Desktop.
Save Kreyren/4fc76d929efbea1bc874760e7f78c810 to your computer and use it in GitHub Desktop.
#!/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