Add new lib for shell

This commit is contained in:
2025-12-04 00:34:50 +01:00
parent 7c30e64c4b
commit 8ef6a87ba1

View File

@@ -0,0 +1,12 @@
log() {
# Write msg to stderr.
# Taken from https://github.com/oils-for-unix/oils/blob/master/stdlib/osh/two.sh
echo "$@" >&2
}
die() {
# Write error msg with script name and exit with status 1.
# Taken from https://github.com/oils-for-unix/oils/blob/master/stdlib/osh/two.sh
log "$@: fatal $@"
exit 1
}