forked from ungleich-public/cdist
Start with errors shell lib
This commit is contained in:
parent
bcdfc0eaa3
commit
c88e6acc77
1 changed files with 16 additions and 0 deletions
16
cdist/conf/lib/errors.sh
Normal file
16
cdist/conf/lib/errors.sh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
__cdist_unsupported_os() {
|
||||||
|
if [ $# -gt 0 ]
|
||||||
|
then
|
||||||
|
os=$1
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
os=$(cat "$__explorer/os")
|
||||||
|
fi
|
||||||
|
printf "Your operating system \"%s\" is currently not supported.\nPlease contribute an implementation for it if you can.\n" "${os}" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
__cdist_error() {
|
||||||
|
printf "$@" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
Loading…
Reference in a new issue