From d3aa97687ecd774fdd38562a8ab237a26ecef981 Mon Sep 17 00:00:00 2001 From: timoxa0 Date: Sun, 27 Oct 2024 16:12:26 +0500 Subject: [PATCH] functions: Fix logs ang arg parser --- common.d/functions.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common.d/functions.sh b/common.d/functions.sh index fd26deb..05991a9 100644 --- a/common.d/functions.sh +++ b/common.d/functions.sh @@ -6,13 +6,13 @@ log() { case "$2" in error) - printf "\e[1m\e[31mERROR:\e[0m \e[1m%s\e[0m\n" "$1";; + printf "\e[1m\e[31mERROR:\e[0m \e[1m%s\e[0m\n" "$1">&2;; internal) - printf "\e[1m\e[96m >>\e[0m \e[1m%s\e[0m\n" "$1";; + printf "\e[1m\e[96m >>\e[0m \e[1m%s\e[0m\n" "$1">&2;; ierror) - printf "\e[1m\e[31m >>\e[0m \e[1m%s\e[0m\n" "$1";; + printf "\e[1m\e[31m >>\e[0m \e[1m%s\e[0m\n" "$1">&2;; *) - printf "\e[1m\e[92m>>>\e[0m \e[1m%s\e[0m\n" "$1";; + printf "\e[1m\e[92m>>>\e[0m \e[1m%s\e[0m\n" "$1">&2;; esac } @@ -56,7 +56,7 @@ arguments() { usage ;; *) - export LNIBUILD="$1" + export LNIBUILD="$opt" break 2 ;; esac done