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