From 888e9e06d5b09d486b7f78a8058e4bbd7ecabb7c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 28 Apr 2020 18:36:53 +0300 Subject: [PATCH] kiss: Add print function for warnings --- kiss | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kiss b/kiss index ec7ce77..9abe667 100755 --- a/kiss +++ b/kiss @@ -27,9 +27,12 @@ log() { "${3:-->}" "${2:+\033[1;36m}" "$1" "$2" >&2 } +war() { + log "$1" "$2" WARNING +} + die() { - # Print a message and exit with '1' (error). - log "$1" "$2" "!>" + log "$1" "$2" ERROR exit 1 } @@ -110,7 +113,7 @@ pkg_lint() { die "$1" "Checksums are missing" 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 }