compare INSIDE.json and NEW.json

This commit is contained in:
fred 2024-03-02 09:55:51 +01:00
parent 5cc3fcff4a
commit 0ea7169bac
2 changed files with 8 additions and 2 deletions

View File

@ -31,6 +31,7 @@ for PLAYER in ${PLAYERONE[@]}; do
[[ ! -d ~/.zen/game/players/${PLAYER:-undefined} ]] && echo "BAD ${PLAYERONE}" && continue
[[ ! $(echo "${PLAYER}" | grep '@') ]] && continue
start=`date +%s`
# CLEAN LOST ACCOUNT
[[ ! -s ~/.zen/game/players/${PLAYER}/secret.dunikey ]] \
&& rm -Rf ~/.zen/game/players/${PLAYER} \
@ -418,6 +419,11 @@ for PLAYER in ${PLAYERONE[@]}; do
rm -Rf ~/.zen/tmp/${MOATS}
echo
end=`date +%s`
dur=`expr $end - $start`
echo "${PLAYER} refreshing took $dur seconds (${MOATS})"
done
echo "============================================ PLAYER.refresh DONE."

View File

@ -89,10 +89,10 @@ while read title; do
## SAME TIDDLER
echo "TIDDLER WITH TITLE $title and more than 1 signature ALREADY EXISTS..."
cat ~/.zen/tmp/${MOATS}/TMP.json | jq .[] > ~/.zen/tmp/${MOATS}/INSIDE.json
cat ~/.zen/tmp/${MOATS}/TMP.json | jq -rc .[] > ~/.zen/tmp/${MOATS}/INSIDE.json
cat "${RSS}" | jq -rc ".[] | select(.title == \"$title\")" > ~/.zen/tmp/${MOATS}/NEW.json
if [[ ! $(diff ~/.zen/tmp/${MOATS}/NEW.json ~/.zen/tmp/${MOATS}/INSIDE.json) ]]; then
if [[ $(diff ~/.zen/tmp/${MOATS}/NEW.json ~/.zen/tmp/${MOATS}/INSIDE.json) == "" ]]; then
echo "... Tiddlers are similar ..."
((floop++))
continue