Change scripts to new paths

This commit is contained in:
exu 2023-11-25 15:45:25 +01:00
parent 33c7b2bdfb
commit 5d9b182dbf
2 changed files with 9 additions and 9 deletions

View File

@ -5,7 +5,7 @@ set -euo pipefail
rm -rf "$HOME/Musik/"*
# change into music raw folder
cd "$HOME/MusikRaw"
cd "$HOME/Nextcloud/MusikRaw"
# get directories
ls -d */ > artistdirectories
@ -22,21 +22,21 @@ while read -r artdir; do
# link cover.jpg
if [[ -f cover.jpg ]]; then
ln -vf "$HOME/MusikRaw/${artdir}/$dir/cover."* "$HOME/Musik/${artdir}/$dir/"
ln -vf "$HOME/Nextcloud/MusikRaw/${artdir}/$dir/cover."* "$HOME/Musik/${artdir}/$dir/"
fi
# make symbolic link to music
# if the "normalized" directory exists, links are created
if [[ -d "normalized" ]]; then
ln -svf "$HOME/MusikRaw/${artdir}/$dir/normalized/"* "$HOME/Musik/${artdir}/$dir/"
ln -svf "$HOME/Nextcloud/MusikRaw/${artdir}/$dir/normalized/"* "$HOME/Musik/${artdir}/$dir/"
fi
# go back to music raw
cd "$HOME/MusikRaw/$artdir"
cd "$HOME/Nextcloud/MusikRaw/$artdir"
done < directories
# cleanup
rm directories
cd "$HOME/MusikRaw"
cd "$HOME/Nextcloud/MusikRaw"
done < artistdirectories
# cleanup
rm artistdirectories

View File

@ -1,8 +1,8 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail
# change into music raw folder
cd "$HOME/MusikRaw"
cd "$HOME/Nextcloud/MusikRaw"
# get directories
ls -d */ > artistdirectories
@ -15,11 +15,11 @@ while read -r artdir; do
while read -r dir; do
cd "$dir"
rm -rf normalized
cd "$HOME/MusikRaw/$artdir"
cd "$HOME/Nextcloud/MusikRaw/$artdir"
done < directories
# cleanup
rm directories
cd "$HOME/MusikRaw"
cd "$HOME/Nextcloud/MusikRaw"
done < artistdirectories
# cleanup
rm artistdirectories