From 1ebc8de0a9104067a1f0bb674dae7ea93c64545b Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 24 Dec 2022 02:02:42 +0100 Subject: [PATCH] speaks better --- 12345.sh | 4 ++-- ajouter_media.sh | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/12345.sh b/12345.sh index 5d64df2e..3921e746 100755 --- a/12345.sh +++ b/12345.sh @@ -231,7 +231,7 @@ while true; do ( ## SUB PROCESS COINS=$($MY_PATH/tools/jaklis/jaklis.py -k ~/.zen/tmp/coucou/${MOATS}.secret.key balance) echo "+++ WALLET BALANCE _ $COINS (G1) _" - [[ $COIN == "" || $COIN == "null" ]] && $MY_PATH/tools/jaklis/jaklis.py -k ~/.zen/tmp/coucou/${MOATS}.secret.key -n "https://data.gchange.fr" send -d "${G1PUB}" -t "BRO." -m "TAPA DE JUNE ? VA AVEC >>> https://cesium.app >>> (ᵔ◡◡ᵔ) FLASHER TON G1VISA " + [[ $COINS == "" || $COINS == "null" ]] && $MY_PATH/tools/jaklis/jaklis.py -k ~/.zen/tmp/coucou/${MOATS}.secret.key -n "https://data.gchange.fr" send -d "${G1PUB}" -t "BRO." -m "TAPA DE JUNE ? VA AVEC >>> https://cesium.app >>> (ᵔ◡◡ᵔ) FLASHER TON G1VISA " end=`date +%s` echo "G1WALLET (☓‿‿☓) Execution time was "`expr $end - $start` seconds. ) & @@ -241,7 +241,7 @@ while true; do ## ARCHIVE TOCTOC ${WHAT}S KEEP LOG (TODO : ERASE) ######################################## mkdir -p ~/.zen/game/players/.toctoc/ - ISTHERE=$(ls -t ~/.zen/game/players/.toctoc/*.${G1PUB}.ipns.key 2>/dev/null | tail -n 1) + ISTHERE=$(ls -t ~/.zen/game/players/.toctoc/*.${G1PUB}.ipns.key 2>/dev/null | tail -n 1 | cut -d '.' -f 1) TTIME=$(echo $ISTHERE | rev | cut -d '.' -f 4 | cut -d '/' -f 1 | rev) if [[ ! $ISTHERE ]]; then echo "${APPNAME} 1ST TOCTOC : ${MOATS}" diff --git a/ajouter_media.sh b/ajouter_media.sh index ccc06653..d2cfba41 100755 --- a/ajouter_media.sh +++ b/ajouter_media.sh @@ -56,7 +56,7 @@ CHOICE="$3" PSEUDO=$(cat ~/.zen/game/players/${PLAYER}/.pseudo 2>/dev/null) espeak "Hello $PSEUDO" -(cd $MY_PATH && git pull && espeak "code ok") & +( cd $MY_PATH && git pull ) & G1PUB=$(cat ~/.zen/game/players/${PLAYER}/.g1pub 2>/dev/null) [[ $G1PUB == "" ]] && espeak "ERROR NO G 1 PUBLIC KEY FOUND - EXIT" && exit 1 @@ -85,6 +85,11 @@ if [ $URL ]; then CHOICE="$IMPORT" fi + ( ## SUB PROCESS + # Get PLAYER wallet amount + COINS=$($MY_PATH/tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey balance | cut -d '.' -f 1) + [[ $COINS == "" || $COINS == "null" ]] && espeak "Missing coins. Free Run." || espeak "You have $COINS Coins" + ) # GET SCREEN DIMENSIONS screen=$(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/') @@ -136,7 +141,7 @@ fi ISADDING=$(ps auxf --sort=+utime | grep -w 'ipfs add' | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) ISPUBLISHING=$(ps auxf --sort=+utime | grep -w 'ipfs name publish' | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) [[ $ISADDING || $ISPUBLISHING ]] \ -&& espeak "I P F S progressing. Please try again later" && exit 1 +&& espeak "I P F S not ready. Wait and try again" && exit 1 ######################################################################## espeak "restart I P F S daemon"