mirror of
https://github.com/sebaschi/dotfiles.git
synced 2026-06-30 18:40:36 +02:00
Add new lib for shell
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user