Change script to work with new file structure

File structure:
MusikRaw > Artist > Albums > {normalized, transcode}
This commit is contained in:
RealStickman 2021-02-12 12:29:58 +01:00
parent 1ef4211ce9
commit a75b240ba1
2 changed files with 32 additions and 10 deletions

View File

@ -5,12 +5,23 @@ set -euo pipefail
cd "$HOME/MusikRaw"
# get directories
ls -d */ > directories
ls -d */ > artistdirectories
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"
cd "$HOME/MusikRaw/$artdir"
done < directories
# cleanup
rm directories
cd "$HOME/MusikRaw"
done < artistdirectories
# cleanup
rm artistdirectories
exit

View File

@ -5,12 +5,23 @@ set -euo pipefail
cd "$HOME/MusikRaw"
# get directories
ls -d */ > directories
ls -d */ > artistdirectories
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"
cd "$HOME/MusikRaw/$artdir"
done < directories
# cleanup
rm directories
cd "$HOME/MusikRaw"
done < artistdirectories
# cleanup
rm artistdirectories
exit