From 42ef38a3bce4300989607419ee6497af477d294b Mon Sep 17 00:00:00 2001 From: purple Date: Tue, 10 Oct 2023 21:51:41 +0200 Subject: [PATCH] fix(core): SC2003 --- blueprint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprint.sh b/blueprint.sh index 52eb196..741b32a 100644 --- a/blueprint.sh +++ b/blueprint.sh @@ -302,7 +302,7 @@ fi # -i, -install if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then VCMD="y" - if [[ $(expr $# - 2) != 1 ]]; then quit_red "[FATAL] Expected 1 argument but got $(expr $# - 2).";fi + if [[ $((expr $# - 2)) != 1 ]]; then quit_red "[FATAL] Expected 1 argument but got $((expr $# - 2)).";fi if [[ ( $3 == "./"* ) || ( $3 == "../"* ) || ( $3 == "/"* ) ]]; then quit_red "[FATAL] Installing extensions located in paths outside of '$FOLDER' is not possible.";fi log_bright "[INFO] Checking dependencies.." @@ -706,7 +706,7 @@ fi # -r, -remove if [[ ( $2 == "-r" ) || ( $2 == "-remove" ) ]]; then VCMD="y" - if [[ $(expr $# - 2) != 1 ]]; then quit_red "[FATAL] Expected 1 argument but got $(expr $# - 2).";fi + if [[ $((expr $# - 2)) != 1 ]]; then quit_red "[FATAL] Expected 1 argument but got $((expr $# - 2)).";fi # Check if the extension is installed. if [[ $(cat .blueprint/data/internal/db/installed_extensions) != *"$identifier,"* ]]; then @@ -1041,7 +1041,7 @@ if [[ ( $2 == "-init" || $2 == "-I" ) ]]; then VCMD="y" if [[ $t_template_files_icon != "" ]]; then log_bright "[INFO] Rolling (and applying) extension placeholder icon.." - icnNUM=$(expr 1 + $RANDOM % 9) + icnNUM=$((expr 1 + $RANDOM % 9)) cp .blueprint/assets/defaultExtensionLogo$icnNUM.jpg .blueprint/tmp/init/$t_template_files_icon sed -i "s~␀icon␀~$t_template_files_icon~g" .blueprint/tmp/init/conf.yml; #ICON fi;