2021-01-20 20:53:23 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
# change into music raw folder
|
|
|
|
cd "$HOME/MusikRaw"
|
|
|
|
|
|
|
|
# get directories
|
2021-02-12 12:29:58 +01:00
|
|
|
ls -d */ > artistdirectories
|
2021-01-20 20:53:23 +01:00
|
|
|
|
2021-02-12 12:29:58 +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 normalized
|
|
|
|
cd "$HOME/MusikRaw/$artdir"
|
|
|
|
done < directories
|
|
|
|
# cleanup
|
|
|
|
rm directories
|
2021-01-20 20:53:23 +01:00
|
|
|
cd "$HOME/MusikRaw"
|
2021-02-12 12:29:58 +01:00
|
|
|
done < artistdirectories
|
|
|
|
# cleanup
|
|
|
|
rm artistdirectories
|
2021-01-22 14:46:34 +01:00
|
|
|
|
|
|
|
exit
|