mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-14 04:43:17 +00:00
replaced 7z to zip
This commit is contained in:
parent
a5e6ceb077
commit
a85d67dab5
|
@ -12,7 +12,7 @@ for i in $ids; do
|
|||
if [ -f "$main_basedir"/all_statuses/$instance/$i/$i.json ]; then
|
||||
ids=$(echo "$ids" | sed -E "s/.?$i.?//g")
|
||||
continue
|
||||
elif [ -n "$(7z e -so $main_basedir/archives/$instance.7z $i | cat)" ]; then
|
||||
elif [ -n "$(unzip -p $main_basedir/archives/$instance.zip "**/$i.json")" ]; then
|
||||
ids=$(echo "$ids" | sed -E "s/.?$i.?//g")
|
||||
continue
|
||||
elif [ -d "$main_basedir"/all_statuses/$instance/$i ]; then
|
||||
|
|
|
@ -7,7 +7,9 @@ for i in "$main_basedir"/all_statuses/$instance/*; do
|
|||
|
||||
old_check=$(date +'%s' -r "$i"/*.json)
|
||||
if [ $old_check -lt $unixtime_offset ]; then
|
||||
7z a -sdel "$main_basedir"/archives/$instance.7z $i
|
||||
zip -r -m -u -X "$main_basedir"/archives/$instance.zip $i
|
||||
echo "[Archiver] Olded status $i $(date -d "@$old_check") moved to archive"
|
||||
fi
|
||||
done
|
||||
|
||||
find "$main_basedir"/all_statuses/$instance -type d -empty -exec rmdir {} + # Fix not removed empty folder after move (zip bug)
|
||||
|
|
Loading…
Reference in a new issue