From 782420f5b4cdc8770966ed98c4d6ebfdc3f2abb4 Mon Sep 17 00:00:00 2001 From: JKANetwork Date: Sun, 12 Feb 2017 23:54:40 +0100 Subject: [PATCH] fixes.. --- installer/installer.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/installer/installer.sh b/installer/installer.sh index 4598c57..eb88e29 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -9,6 +9,14 @@ ## $5 -> Is a "various-sentence command"? (1 -> First / Not lastest, 2 -> Last ) function comm { local command + local multic + # Do not permit that $5 is empty. For multicommand/multisentence checks + if [[ -z "$5" ]];then + multic="0" + else + multic=$5 + fi + # First complete the command, if necessary if [[ $3 == "chroot" ]];then command="chroot /mnt /bin/bash -c \"$4\"" @@ -31,10 +39,10 @@ function comm { fi # Update multiSentence var - if [[ $5 == "1" ]];then + if [[ $multic == "1" ]];then multiSentence="1" fi - if [[ $5 == "2" ]];then + if [[ $multic == "2" ]];then multiSentence="0" fi @@ -44,7 +52,7 @@ function comm { echo "[ ERROR ] $1" >> /tmp/install.log fi - if [ $? == "0" ] && [ $5 != "1" ];then + if [ $? == "0" ] && [ $multic != "1" ];then echo "[ OK ] $1" echo "[ OK ] $1" >> /tmp/install.log fi