Change script to work with new file structure
File structure: MusikRaw > Artist > Albums > {normalized, transcode}
This commit is contained in:
parent
1ef4211ce9
commit
a75b240ba1
@ -5,12 +5,23 @@ set -euo pipefail
|
||||
cd "$HOME/MusikRaw"
|
||||
|
||||
# get directories
|
||||
ls -d */ > directories
|
||||
ls -d */ > artistdirectories
|
||||
|
||||
while read -r dir; do
|
||||
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
|
||||
cd "$HOME/MusikRaw"
|
||||
done < directories
|
||||
done < artistdirectories
|
||||
# cleanup
|
||||
rm artistdirectories
|
||||
|
||||
exit
|
||||
|
@ -5,12 +5,23 @@ set -euo pipefail
|
||||
cd "$HOME/MusikRaw"
|
||||
|
||||
# get directories
|
||||
ls -d */ > directories
|
||||
ls -d */ > artistdirectories
|
||||
|
||||
while read -r dir; do
|
||||
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
|
||||
cd "$HOME/MusikRaw"
|
||||
done < directories
|
||||
done < artistdirectories
|
||||
# cleanup
|
||||
rm artistdirectories
|
||||
|
||||
exit
|
||||
|
Loading…
Reference in New Issue
Block a user