creating /tmp/liking_me cache
This commit is contained in:
parent
6d5722fa94
commit
12f9d1c8bd
|
@ -103,7 +103,7 @@ fi
|
|||
IamINBOOTSTRAP=$(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep "$IPFSNODEID") # AM I A BOOTSTRAP ?
|
||||
ipfsnodeid=${IamINBOOTSTRAP##*/}
|
||||
## FILTER Qm !
|
||||
[[ ! "${ipfsnodeid:0:2}" == "Qm" ]] && IamBOOTSTRAP=$(~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $ipfsnodeid) || IamBOOTSTRAP="" # Contains G1PUB
|
||||
[[ "${ipfsnodeid:0:2}" != "Qm" ]] && IamBOOTSTRAP=$(~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $ipfsnodeid) || IamBOOTSTRAP="" # Contains G1PUB
|
||||
|
||||
################## AUTO PINNING for BOOTSTRAP
|
||||
[[ $IamBOOTSTRAP ]] && ~/.zen/astrXbian/zen/tools/autoPINfriends.sh
|
||||
|
@ -112,7 +112,10 @@ ipfsnodeid=${IamINBOOTSTRAP##*/}
|
|||
|
||||
################## CHECKING WHO GAVE ME STARS
|
||||
rm -f /tmp/friend_of_mine
|
||||
for liking_me in $(~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars | jq -r '.likes[].issuer' && ~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#" | rev | cut -d '/' -f 1 | rev | shuf | head -n 1) );
|
||||
~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars | jq -r '.likes[].issuer' > /tmp/liking_me
|
||||
~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#" | rev | cut -d '/' -f 1 | rev | shuf | head -n 1) >> /tmp/liking_me
|
||||
|
||||
for liking_me in $(cat /tmp/liking_me);
|
||||
do
|
||||
##### BOOTSTRAP AUTO LIKE BACK (NOT liking Myself)
|
||||
if [[ "$IamBOOTSTRAP" == "$G1PUB" ]]; then
|
||||
|
@ -128,7 +131,7 @@ do
|
|||
|
||||
|
||||
##### CHECKING IF WE LIKE EACH OTHER (AVOID LIKING MYSELF)
|
||||
~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars -p $liking_me > /tmp/Gstars.json
|
||||
~/.zen/astrXbian/zen/tools/timeout.sh -t 12 ~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars -p $liking_me > /tmp/Gstars.json
|
||||
|
||||
[[ ! -f /tmp/Gstars.json ]] && rm -Rf ~/.zen/ipfs/.${IPFSNODEID}/FRIENDS/$liking_me && echo "$liking_me is a BUZZ FRIEND !!!" && continue
|
||||
|
||||
|
|
Loading…
Reference in New Issue