1
0
Fork 0
mirror of https://github.com/Luzifer/archrepo.git synced 2024-12-20 21:21:19 +00:00
archrepo/scripts/has_archive_mix.sh
Knut Ahlers 89bb621a4e
Don't fail make run when not explicitly asked
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2020-07-16 00:17:27 +02:00

16 lines
436 B
Bash

#!/bin/bash
set -euo pipefail
[[ $(find . -name '*.tar.zst' | wc -l) -gt 0 ]] || {
echo "No zst archives found, nothing to worry"
exit 0
}
[[ $(find . -name '*.tar.xz' | wc -l) -gt 0 ]] && {
echo "Both XZ and zst archives found, pay attention!"
} || true
[[ $(find . -name '*.db.tar.xz' | wc -l) -gt 0 ]] && [[ $(find . -name '*.db.tar.zst' | wc -l) -gt 0 ]] && {
echo "Found XZ and zst databases! Check this!"
exit 1
} || true