pleroma-cli/utils/statuses2files_acct.sh

17 lines
470 B
Bash
Raw Normal View History

2022-08-05 16:09:45 +00:00
#!/bin/sh
# Move statuses to acct dirs
json=$(cat)
for i in $ids; do
status_id=$i
acct=$(echo "$json" | jj "#[id=$i].account.acct")
2022-08-05 16:09:45 +00:00
mkdir -m 711 -p "$main_basedir"/statuses/$instance/$acct
if [ -n "$status_id" ]; then
ln -s -r "$main_basedir"/all_statuses/$instance/$status_id "$main_basedir"/statuses/$instance/$acct/$status_id
touch --reference "$main_basedir"/all_statuses/$instance/$status_id "$main_basedir"/statuses/$instance/$acct/$status_id
2022-08-05 16:09:45 +00:00
fi
done