mirror of
https://github.com/sebaschi/dotfiles.git
synced 2026-11-15 01:30:27 +01:00
Add new lib for shell
This commit is contained in:
1 parent
7c30e64c4b
commit
8ef6a87ba1
1 file changed
+12
@@ -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