statuses2files_group.sh 557 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. # Group statuses by acct and timelines dirs
  3. json=$(cat)
  4. for i in $ids; do
  5. status_id=$i
  6. acct=$(echo "$json" | jj "#[id=$i].account.acct")
  7. echo "$acct" > "$main_basedir"/all_statuses/$instance/$i/acct
  8. mkdir -m 711 -p "$main_basedir"/statuses/$instance/$acct
  9. if [ -n "$status_id" ]; then
  10. ln -v -s -r "$main_basedir"/all_statuses/$instance/$status_id "$main_basedir"/statuses/$instance/$acct/$status_id
  11. ln -v -s -r "$main_basedir"/all_statuses/$instance/$status_id "$main_basedir"/timelines/$instance/$timeline/$status_id
  12. fi
  13. done