Fixed for loop
This commit is contained in:
parent
106682ac41
commit
0155775ded
@ -69,11 +69,11 @@ LENGTH="$(echo "$RESULT" | jq -r '. | .post | length')"
|
|||||||
SELECTION=`seq 0 $LENGTH`
|
SELECTION=`seq 0 $LENGTH`
|
||||||
|
|
||||||
for i in $SELECTION;do
|
for i in $SELECTION;do
|
||||||
MD5="$(echo "$RESULT" | jq -r '. | .post['"$SELECTION"'].md5')"
|
MD5="$(echo "$RESULT" | jq -r '. | .post['"$i"'].md5')"
|
||||||
[ -z "$MD5" ] && continue
|
[ -z "$MD5" ] && continue
|
||||||
grep -q "$MD5" "$TMP" && continue
|
grep -q "$MD5" "$TMP" && continue
|
||||||
URL_FILE="$(echo "$RESULT" | jq -r '. | .post['"$SELECTION"'].file_url')"
|
URL_FILE="$(echo "$RESULT" | jq -r '. | .post['"$i"'].file_url')"
|
||||||
RATING="$(echo "$RESULT" | jq -r '. | .post['"$SELECTION"'].rating')"
|
RATING="$(echo "$RESULT" | jq -r '. | .post['"$i"'].rating')"
|
||||||
|
|
||||||
NSFW="--nsfw"
|
NSFW="--nsfw"
|
||||||
TEXT="$MSG_NSFW"
|
TEXT="$MSG_NSFW"
|
||||||
|
Loading…
Reference in New Issue
Block a user