check .chain
This commit is contained in:
parent
0618ff5299
commit
7f84919194
|
@ -70,7 +70,7 @@ for g1wish in $(ls ~/.zen/game/players/$PLAYER/voeux/); do
|
|||
##################################################################"
|
||||
OLDIG1BAR=$(cat ~/.zen/game/world/$g1wish/.ig1barre)
|
||||
|
||||
BAL=$($MY_PATH/../tools/jaklis/jaklis.py -p $g1wish balance)
|
||||
BAL=$($MY_PATH/../tools/jaklis/jaklis.py balance -p $g1wish )
|
||||
echo "MONTANT (G1) $BAL"
|
||||
##################################################################"
|
||||
IG1BAR=$(ipfs add -Hq ~/.zen/game/world/$g1wish/g1barre.png | tail -n 1)
|
||||
|
@ -81,6 +81,22 @@ for g1wish in $(ls ~/.zen/game/players/$PLAYER/voeux/); do
|
|||
sed -i "s~${OLDIG1BAR}~${IG1BAR}~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
||||
echo $IG1BAR > ~/.zen/game/world/$g1wish/.ig1barre
|
||||
echo "Update new g1barre: /ipfs/$IG1BAR"
|
||||
|
||||
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||
echo "Avancement blockchain TW $PLAYER : $MOATS"
|
||||
cp ~/.zen/game/players/$PLAYER/ipfs/moa/.chain ~/.zen/game/players/$PLAYER/ipfs/moa/.chain.$MOATS
|
||||
|
||||
TW=$(ipfs add -Hq ~/.zen/game/players/$PLAYER/ipfs/moa/index.html | tail -n 1)
|
||||
echo "ipfs name publish --key=$PLAYER /ipfs/$TW"
|
||||
ipfs name publish --key=$PLAYER /ipfs/$TW
|
||||
|
||||
# MAJ CACHE TW $PLAYER
|
||||
echo $TW > ~/.zen/game/players/$PLAYER/ipfs/moa/.chain
|
||||
echo $MOATS > ~/.zen/game/players/$PLAYER/ipfs/moa/.moats
|
||||
echo
|
||||
##################################################################"
|
||||
##################################################################"
|
||||
|
||||
fi
|
||||
|
||||
### NO OLDIG1BAR, MEANS FIRST RUN
|
||||
|
@ -120,24 +136,6 @@ if [[ $OLDIG1BAR == "" ]]; then # CREATE Tiddler
|
|||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||
echo "Avancement blockchain TW $PLAYER : $MOATS"
|
||||
cp ~/.zen/game/players/$PLAYER/ipfs/moa/.chain ~/.zen/game/players/$PLAYER/ipfs/moa/.chain.$MOATS
|
||||
|
||||
TW=$(ipfs add -Hq ~/.zen/game/players/$PLAYER/ipfs/moa/index.html | tail -n 1)
|
||||
echo "ipfs name publish --key=$PLAYER /ipfs/$TW"
|
||||
ipfs name publish --key=$PLAYER /ipfs/$TW
|
||||
|
||||
# MAJ CACHE TW $PLAYER
|
||||
echo $TW > ~/.zen/game/players/$PLAYER/ipfs/moa/.chain
|
||||
echo $MOATS > ~/.zen/game/players/$PLAYER/ipfs/moa/.moats
|
||||
echo
|
||||
##################################################################"
|
||||
##################################################################"
|
||||
|
||||
|
||||
done
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue