mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-22 08:11:28 +00:00
Fix backup conditions
This commit is contained in:
parent
792ce471f0
commit
c5d64e621e
|
@ -147,7 +147,9 @@ follow_api_export()
|
||||||
while [ $count -gt 0 ]; do
|
while [ $count -gt 0 ]; do
|
||||||
followings=$(followings_api_get $acc_id)
|
followings=$(followings_api_get $acc_id)
|
||||||
count=$(echo $followings | jj \#)
|
count=$(echo $followings | jj \#)
|
||||||
if [ $count -lt 40 ]; then
|
if [ $count -eq 0 ]; then
|
||||||
|
echo "$acc_following_count followings exported"
|
||||||
|
elif [ $count -lt 40 ]; then
|
||||||
countindex=$(expr $count - 1)
|
countindex=$(expr $count - 1)
|
||||||
echo $followings | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/friends.csv
|
echo $followings | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/friends.csv
|
||||||
offset=$(echo $followings | jj $countindex.id)
|
offset=$(echo $followings | jj $countindex.id)
|
||||||
|
@ -159,8 +161,6 @@ follow_api_export()
|
||||||
echo $followings | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/friends.csv
|
echo $followings | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/friends.csv
|
||||||
offset=$(echo $followings | jj $countindex.id)
|
offset=$(echo $followings | jj $countindex.id)
|
||||||
echo "+$count follows"
|
echo "+$count follows"
|
||||||
else
|
|
||||||
echo "$acc_following_count followings exported"
|
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
@ -173,7 +173,9 @@ blocks_api_export()
|
||||||
while [ $count -gt 0 ]; do
|
while [ $count -gt 0 ]; do
|
||||||
blocks=$(blocks_api_get)
|
blocks=$(blocks_api_get)
|
||||||
count=$(echo $blocks | jj \#)
|
count=$(echo $blocks | jj \#)
|
||||||
if [ $count -lt 40 ]; then
|
if [ $count -eq 0 ]; then
|
||||||
|
echo "Blocks exported"
|
||||||
|
elif [ $count -lt 40 ]; then
|
||||||
countindex=$(expr $count - 1)
|
countindex=$(expr $count - 1)
|
||||||
echo $blocks | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/blocks.csv
|
echo $blocks | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/blocks.csv
|
||||||
offset=$(echo $blocks | jj $countindex.id)
|
offset=$(echo $blocks | jj $countindex.id)
|
||||||
|
@ -184,8 +186,6 @@ blocks_api_export()
|
||||||
echo $blocks | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/blocks.csv
|
echo $blocks | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/blocks.csv
|
||||||
offset=$(echo $blocks | jj $countindex.id)
|
offset=$(echo $blocks | jj $countindex.id)
|
||||||
echo "+$count blocks"
|
echo "+$count blocks"
|
||||||
else
|
|
||||||
echo "Blocks exported"
|
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
@ -198,7 +198,9 @@ mutes_api_export()
|
||||||
while [ $count -gt 0 ]; do
|
while [ $count -gt 0 ]; do
|
||||||
mutes=$(mutes_api_get)
|
mutes=$(mutes_api_get)
|
||||||
count=$(echo $mutes | jj \#)
|
count=$(echo $mutes | jj \#)
|
||||||
if [ $count -lt 40 ]; then
|
if [ $count -eq 0 ]; then
|
||||||
|
echo "Mutes exported"
|
||||||
|
elif [ $count -lt 40 ]; then
|
||||||
countindex=$(expr $count - 1)
|
countindex=$(expr $count - 1)
|
||||||
echo $mutes | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/mutes.csv
|
echo $mutes | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/mutes.csv
|
||||||
offset=$(echo $mutes | jj $countindex.id)
|
offset=$(echo $mutes | jj $countindex.id)
|
||||||
|
@ -209,8 +211,6 @@ mutes_api_export()
|
||||||
echo $mutes | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/mutes.csv
|
echo $mutes | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/mutes.csv
|
||||||
offset=$(echo $mutes | jj $countindex.id)
|
offset=$(echo $mutes | jj $countindex.id)
|
||||||
echo "+$count mutes"
|
echo "+$count mutes"
|
||||||
else
|
|
||||||
echo "Mutes exported"
|
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue