mirror of
https://github.com/sebaschi/dotfiles.git
synced 2025-12-29 02:08:27 +01:00
Add new lib for shell
This commit is contained in:
12
shellib/dot-local/lib/shellib/libseb.sh
Normal file
12
shellib/dot-local/lib/shellib/libseb.sh
Normal 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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user