From 774d6f7e7a4c7492f65d03e32dbe4b92788691fd Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 1 Dec 2023 03:26:56 +0100 Subject: [PATCH] [[ $(echo "$CURCOINS > 100" | bc -l) -eq 1 ]] --- API/QRCODE.sh | 2 +- RUNTIME/PLAYER.refresh.sh | 6 +++--- RUNTIME/VOEUX.refresh.sh | 2 +- tools/PAY4SURE.sh | 2 +- tools/make_image_ipfs_index_carousel.sh | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/API/QRCODE.sh b/API/QRCODE.sh index 6275f7f07..053fa8611 100755 --- a/API/QRCODE.sh +++ b/API/QRCODE.sh @@ -888,7 +888,7 @@ else ## DOES CURRENT IS RICHER THAN 100 G1 ## IF GCHANGE ACCOUNT FOUND => SEND PALPE JUNE. # SEND MESSAGE TO GCHANGE MESSAGING. SEND 5 ★ - if (( $(echo "$CURCOINS > 100" | bc -l) )) && [ "$PALPE" != 0 ]; then + if [[ $(echo "$CURCOINS > 100" | bc -l) -eq 1 ]] && [ "$PALPE" != 0 ]; then ## LE COMPTE VISITOR EST VIDE echo "## AUTOGRAPH $CURPLAYER SEND $PALPE TO ${QRCODE}" diff --git a/RUNTIME/PLAYER.refresh.sh b/RUNTIME/PLAYER.refresh.sh index e0fcf06e0..1c707e48c 100755 --- a/RUNTIME/PLAYER.refresh.sh +++ b/RUNTIME/PLAYER.refresh.sh @@ -200,13 +200,13 @@ for PLAYER in ${PLAYERONE[@]}; do ############################################################## echo "##################################################################" - (( $(echo "$COIN > 2" | bc -l) )) \ + [[ $(echo "$COINS > 2" | bc -l) -eq 1 ]] \ && echo "## Connect_PLAYER_To_Gchange.sh" \ && ${MY_PATH}/../tools/Connect_PLAYER_To_Gchange.sh "${PLAYER}" \ || echo "1 G1 + 10 ẑen needed to activate ★★★★★ system" # G1PalPay - 1 G1 + 10 ZEN mini -> Check for G1 TX incoming comments # - (( $(echo "$COIN > 1" | bc -l) )) \ + [[ $(echo "$COINS > 1" | bc -l) -eq 1 ]] \ && echo "## RUNNING G1PalPay Wallet Monitoring " \ && ${MY_PATH}/G1PalPay.sh ${HOME}/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html "${PLAYER}" \ || echo "> ZenCard is not activated ($ZEN)" @@ -320,7 +320,7 @@ for PLAYER in ${PLAYERONE[@]}; do ## CHECK FOR EMPTY RSS + 30 DAYS BIRTHDATE + null G1 [[ $(cat ~/.zen/game/players/${PLAYER}/ipfs/${PLAYER}.rss.json) == "[]" ]] \ && echo "RSS IS EMPTY -- COINS=$COINS / ZEN=$ZEN --" \ - && (( $(echo "$COINS < 2.1" | bc -l) )) \ + && [[ $(echo "$COINS < 2.1" | bc -l) -eq 1 ]] \ && SBIRTH=$(${MY_PATH}/../tools/MOATS2seconds.sh ${BIRTHDATE}) \ && SNOW=$(${MY_PATH}/../tools/MOATS2seconds.sh ${MOATS}) \ && [[ $(( SNOW - SBIRTH )) -gt $(( 27 * 24 * 60 * 60 )) ]] \ diff --git a/RUNTIME/VOEUX.refresh.sh b/RUNTIME/VOEUX.refresh.sh index f018e7f84..6fe9829af 100755 --- a/RUNTIME/VOEUX.refresh.sh +++ b/RUNTIME/VOEUX.refresh.sh @@ -47,7 +47,7 @@ rm -Rf ~/.zen/tmp/${IPFSNODEID}/${PLAYER} && exit 0 echo "%% ${COINS} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" -(( $(echo "$COIN < 2" | bc -l) )) && echo ">>> ${COINS} ONLY : 20 ZEN NEEDED TO CONTINUE" && exit 0 +[[ $(echo "$COINS < 2" | bc -l) -eq 1 ]] && echo ">>> ${COINS} ONLY : 1 G1 + 10 ZEN NEEDED TO CONTINUE" && exit 0 ############################### ## EXTRACT G1Voeu from PLAYER TW diff --git a/tools/PAY4SURE.sh b/tools/PAY4SURE.sh index 18ee16bbc..d9d339fcb 100755 --- a/tools/PAY4SURE.sh +++ b/tools/PAY4SURE.sh @@ -28,7 +28,7 @@ COINS=$($MY_PATH/COINScheck.sh ${PAYOUTPUB} | tail -n 1) ###### TEST INPUT VALUES [[ $AMOUNT == "ALL" ]] && AMOUNT=$COINS ## ALL MEAN EMPTY ORIGIN WALLET [[ -z $AMOUNT ]] && echo "ERROR : ${PAYOUTPUB}=$COINS MISSING AMOUNT" && exit 1 -(( $( echo "$COINS < $AMOUNT" | bc -l) )) && echo "ERROR : SOURCE WALLET IS MISSING COINS !!! $AMOUNT > $COINS" && exit 1 +[[ $(echo "$COINS < $AMOUNT" | bc -l) -eq 1 ]] && echo "ERROR : SOURCE WALLET IS MISSING COINS !!! $AMOUNT > $COINS" && exit 1 [[ -z $G1PUB ]] && echo "ERROR : ${PAYOUTPUB}=$COINS ($AMOUNT) MISSING DESTINATION" && exit 1 echo "PAYMENT PROCESSOR ID ${MOATS}" diff --git a/tools/make_image_ipfs_index_carousel.sh b/tools/make_image_ipfs_index_carousel.sh index 5826d356d..a70486123 100755 --- a/tools/make_image_ipfs_index_carousel.sh +++ b/tools/make_image_ipfs_index_carousel.sh @@ -47,7 +47,7 @@ if [[ ! -d $img_dir ]]; then ################## ## PREPARE LOOP LINK LINE ASTRONAUTENS=$(cat ~/.zen/game/players/${PLAYER}/.playerns) - (( $(echo "$COINS > 0" | bc -l) )) \ + [[ $(echo "$COINS > 0" | bc -l) -eq 1 ]] \ && echo "_REPLACE_" > ~/.zen/tmp/carousel/${pub}.insert \ || echo "_REPLACE_" > ~/.zen/tmp/carousel/${pub}.insert