mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-07-02 14:02:26 +00:00
kiss: Add print function for warnings
This commit is contained in:
parent
1a89e0b0a2
commit
888e9e06d5
9
kiss
9
kiss
|
@ -27,9 +27,12 @@ log() {
|
||||||
"${3:-->}" "${2:+\033[1;36m}" "$1" "$2" >&2
|
"${3:-->}" "${2:+\033[1;36m}" "$1" "$2" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
war() {
|
||||||
|
log "$1" "$2" WARNING
|
||||||
|
}
|
||||||
|
|
||||||
die() {
|
die() {
|
||||||
# Print a message and exit with '1' (error).
|
log "$1" "$2" ERROR
|
||||||
log "$1" "$2" "!>"
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +113,7 @@ pkg_lint() {
|
||||||
die "$1" "Checksums are missing"
|
die "$1" "Checksums are missing"
|
||||||
|
|
||||||
case $PWD in "$KISS_ROOT/var/db/kiss/installed"*)
|
case $PWD in "$KISS_ROOT/var/db/kiss/installed"*)
|
||||||
log "$1" "WARN: This package no longer exists in the repositories"
|
war "$1" "no longer exists in the repositories"
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user