configs/arch-config/scripts/pieces/archive/music-delete-transcode.sh

28 lines
510 B
Bash
Raw Normal View History

2021-01-26 09:49:24 +01:00
#!/usr/bin/env bash
set -euo pipefail
# change into music raw folder
cd "$HOME/MusikRaw"
# get directories
ls -d */ > artistdirectories
2021-01-26 09:49:24 +01:00
while read -r artdir; do
cd "$artdir"
# get albums
ls -d */ > directories
# delete normalized from albums
while read -r dir; do
cd "$dir"
rm -rf "transcode"
cd "$HOME/MusikRaw/$artdir"
done < directories
# cleanup
rm directories
2021-01-26 09:49:24 +01:00
cd "$HOME/MusikRaw"
done < artistdirectories
# cleanup
rm artistdirectories
2021-01-26 09:49:24 +01:00
exit