From 0ca9ad28dce58088e1cdc2768f9a9b1d8133594a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Sun, 30 Jun 2024 17:42:08 +0300 Subject: [PATCH] Code Update --- init.sh | 7 +++++-- src/base.sh | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/init.sh b/init.sh index a6d58ae..507fd24 100755 --- a/init.sh +++ b/init.sh @@ -317,8 +317,11 @@ wi-stop (){ wi-restricted "$0 $1 $2" -apt update &> /dev/null -apt install -y jq &> /dev/null +if [[ ! -f /bin/jq ]] +then + apt update &> /dev/null + apt install -y jq &> /dev/null +fi wi-init $1 $2 wi-stop diff --git a/src/base.sh b/src/base.sh index 4bf1594..6e3510f 100644 --- a/src/base.sh +++ b/src/base.sh @@ -20,8 +20,11 @@ wiNormal=$(tput sgr0) wi-restricted "$0 $1 $2" -apt update &> /dev/null -apt install -y jq &> /dev/null +if [[ ! -f /bin/jq ]] +then + apt update &> /dev/null + apt install -y jq &> /dev/null +fi wi-init $1 $2 wi-stop