forked from axiom-team/astrXbian
todo/done swarm compare
This commit is contained in:
parent
5d4ba11712
commit
a35c910395
|
@ -15,9 +15,6 @@ IPFSNODEID=$(ipfs id -f='<id>\n')
|
||||||
[[ -f ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid ]] && AXID=$(cat ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid);
|
[[ -f ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid ]] && AXID=$(cat ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid);
|
||||||
[[ -f ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title ]] && XZUID=$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title)
|
[[ -f ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title ]] && XZUID=$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title)
|
||||||
|
|
||||||
echo "REFRESH IPNS SELF PUBLISH"
|
|
||||||
~/.zen/astrXbian/zen/ipns_self_publish.sh
|
|
||||||
|
|
||||||
## CREATION DE LA ZONE DE DIALOGUE IPFS SWARM
|
## CREATION DE LA ZONE DE DIALOGUE IPFS SWARM
|
||||||
for wpcall in $(ls -d ~/.zen/ipfs_swarm/.12D*/astroport/wordpress/*);
|
for wpcall in $(ls -d ~/.zen/ipfs_swarm/.12D*/astroport/wordpress/*);
|
||||||
do
|
do
|
||||||
|
@ -26,15 +23,18 @@ do
|
||||||
g1pubsource=$($MY_PATH/tools/ipfs_to_g1.py $ipfnodesource)
|
g1pubsource=$($MY_PATH/tools/ipfs_to_g1.py $ipfnodesource)
|
||||||
mediakey=$(echo "$wpcall" | cut -d '/' -f 9 )
|
mediakey=$(echo "$wpcall" | cut -d '/' -f 9 )
|
||||||
|
|
||||||
[[ -f $wpcall/do ]] && istodo=$(ipfs cat /ipns/$ipfnodesource/.$ipfnodesource/astroport/wordpress/$mediakey/do) && echo "istodo=$istodo"
|
if [[ -f $wpcall/do ]]; then
|
||||||
[[ $istodo && "$istodo" != "1" ]] && isdone=$(ipfs cat /ipns/$istodo/.$istodo/astroport/wordpress/$mediakey/done) && echo "isdone=$isdone"
|
istodo=$(cat "$wpcall/do") && echo "istodo=$istodo"
|
||||||
[[ ! $isdone && ! $istodo ]] && continue
|
istodoswarm=$(ipfs cat /ipns/$ipfnodesource/.$ipfnodesource/astroport/wordpress/$mediakey/do) && echo "istodoswarm=$istodoswarm"
|
||||||
|
isdone=$(cat "$wpcall/done") && echo "isdone=$isdone"
|
||||||
|
isdoneswarm=$(ipfs cat /ipns/$ipfnodesource/.$ipfnodesource/astroport/wordpress/$mediakey/done) && echo "isdoneswarm=$isdoneswarm"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$ipfsnodeid" != "$IPFSNODEID" ]]; then
|
if [[ "$ipfsnodeid" != "$IPFSNODEID" ]]; then
|
||||||
[[ ! $(which wp) ]] && continue # MUST RUN WORDPRESS and wp-cli
|
[[ ! $(which wp) ]] && continue # MUST RUN WORDPRESS and wp-cli
|
||||||
|
|
||||||
## I am the destination of that "done / not todo" wpcall
|
## I am the destination of that "done / not todo" wpcall
|
||||||
[[ $isdone && ! $istodo ]] && echo "0" > ~/.zen/ipfs/.$ipfnodesource/astroport/wordpress/$mediakey/do
|
[[ $isdone && ! $istodo ]] && echo "DONE not TODO. removing done" && rm -Rf ~/.zen/ipfs/.$ipfnodesource/astroport/wordpress/$mediakey
|
||||||
|
|
||||||
if [[ $istodo && ! $isdone ]]; then
|
if [[ $istodo && ! $isdone ]]; then
|
||||||
[[ "$istodo" == "$IPFSNODEID" ]] && echo "Already DONE by $istodo" && continue
|
[[ "$istodo" == "$IPFSNODEID" ]] && echo "Already DONE by $istodo" && continue
|
||||||
|
|
Loading…
Reference in New Issue