From 785ca697b376720a08aa4b0e116d10779027ccbe Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 25 Apr 2022 10:18:13 -0400 Subject: [PATCH] Update debian-v3.sh --- ct/debian-v3.sh | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/ct/debian-v3.sh b/ct/debian-v3.sh index 0870c851..245c11bf 100644 --- a/ct/debian-v3.sh +++ b/ct/debian-v3.sh @@ -28,33 +28,23 @@ alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function error_exit() { trap - ERR - local DEFAULT="Unknown failure occured." - local REASON="${1:-$DEFAULT}" - local FLAG="${RD}‼ ERROR ${CL}$EXIT@$LINE" - echo -e "$FLAG $REASON" 1>&2 + local reason="Unknown failure occured." + local msg="${1:-$reason}" + local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + echo -e "$flag $msg" 1>&2 exit $EXIT } -function warn() { - local REASON="$1" - local FLAG="${YW}⚠ WARNING ${CL}" - echo -e "$FLAG $REASON" -} -function info() { - local REASON="$1" - local FLAG="${BL}ℹ INFO ${CL}" - echo -e "$FLAG $REASON" -} while true; do read -p "This will create a New ${APP} LXC. Proceed(y/n)?" yn