mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-25 10:23:42 +01:00
16 lines
355 B
Bash
Executable File
16 lines
355 B
Bash
Executable File
#!/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
|