Scripts, scenes, bridges, bots and more
This commit is contained in:
18
scripts/clean.sh
Executable file
18
scripts/clean.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
# scripts/clean.sh — audit which .webm sources in playlist/ already have a
|
||||
# converted .m4a sibling (produced by scripts/convert.sh). Read-only; deletes
|
||||
# nothing. Run from anywhere — operates on $OBS_DIR/playlist/.
|
||||
set -euo pipefail
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
OBS_DIR="$(cd "$DIR/.." && pwd)"
|
||||
PLAYLIST="$OBS_DIR/playlist"
|
||||
|
||||
[[ -d "$PLAYLIST" ]] || { echo " ✗ $PLAYLIST does not exist" >&2; exit 1; }
|
||||
cd "$PLAYLIST"
|
||||
|
||||
shopt -s nullglob
|
||||
for f in *.webm; do
|
||||
m="${f%.webm}.m4a"
|
||||
[[ -f "$m" ]] && echo "OK $f → $m" || echo "MISS $f (no m4a yet, keep!)"
|
||||
done
|
||||
Reference in New Issue
Block a user