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"
|
cd "$HOME/MusikRaw"
|
||||||
|
|
||||||
# get directories
|
# 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
|
while read -r dir; do
|
||||||
cd "$dir"
|
cd "$dir"
|
||||||
rm -rf normalized
|
rm -rf normalized
|
||||||
cd "$HOME/MusikRaw"
|
cd "$HOME/MusikRaw/$artdir"
|
||||||
done < directories
|
done < directories
|
||||||
|
# cleanup
|
||||||
|
rm directories
|
||||||
|
cd "$HOME/MusikRaw"
|
||||||
|
done < artistdirectories
|
||||||
|
# cleanup
|
||||||
|
rm artistdirectories
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
@ -5,12 +5,23 @@ set -euo pipefail
|
|||||||
cd "$HOME/MusikRaw"
|
cd "$HOME/MusikRaw"
|
||||||
|
|
||||||
# get directories
|
# 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
|
while read -r dir; do
|
||||||
cd "$dir"
|
cd "$dir"
|
||||||
rm -rf "transcode"
|
rm -rf "transcode"
|
||||||
cd "$HOME/MusikRaw"
|
cd "$HOME/MusikRaw/$artdir"
|
||||||
done < directories
|
done < directories
|
||||||
|
# cleanup
|
||||||
|
rm directories
|
||||||
|
cd "$HOME/MusikRaw"
|
||||||
|
done < artistdirectories
|
||||||
|
# cleanup
|
||||||
|
rm artistdirectories
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
Loading…
Reference in New Issue
Block a user