mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-10-31 22:27:21 +00:00
21 lines
432 B
Bash
21 lines
432 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
# Move statuses to acct dirs
|
||
|
# [statuses]
|
||
|
# |
|
||
|
# |---[acct]
|
||
|
# | |
|
||
|
# | |--- [status_id]
|
||
|
# | |--- ...
|
||
|
# |...
|
||
|
|
||
|
for i in "$main_basedir"/statuses/$instance/*/*.json; do
|
||
|
status_id=$(jj -i $i 'id')
|
||
|
acct=$(jj -i $i 'account.acct')
|
||
|
mkdir -m 711 -p "$main_basedir"/statuses/$instance/$acct
|
||
|
if [ -n "$status_id" ]; then
|
||
|
mv "$main_basedir"/statuses/$instance/$status_id "$main_basedir"/statuses/$instance/$acct
|
||
|
fi
|
||
|
done
|
||
|
|