mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-29 04:03:42 +01:00
16 lines
355 B
Plaintext
16 lines
355 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
|
||
|
SYNC_DIR="${HOME}/sync"
|
||
|
archive_maybe=(
|
||
|
"${HOME}/sync/org"
|
||
|
"${HOME}/sync/org-roam"
|
||
|
"${HOME}/sync/sites"
|
||
|
)
|
||
|
|
||
|
for dir in "${archive_maybe[@]}"; do
|
||
|
if [ "$(find "$dir" -type f -mtime -1 | wc -l)" -gt 0 ]; then
|
||
|
create-archive "$dir"
|
||
|
mv -v "$dir-$(date '+%Y%m%d').tar.gz" "${SYNC_DIR}/archived/"
|
||
|
fi
|
||
|
done
|