feat: add yell, die, try

This commit is contained in:
hophacker 2022-04-16 09:43:12 +08:00 committed by hophacker
parent fdde35a182
commit ddc0249660

View File

@ -350,3 +350,6 @@ function list-large-files {
echo $LIST | grep '^[0-9.]*M.' | sort -n
echo $LIST | grep '^[0-9.]*G.' | sort -n
}
yell() { echo "$0: $*" >&2; }
die() { yell "$*"; exit 111; }
try() { "$@" || die "cannot $*"; }