Change scripts to new paths
This commit is contained in:
parent
33c7b2bdfb
commit
5d9b182dbf
@ -5,7 +5,7 @@ set -euo pipefail
|
|||||||
rm -rf "$HOME/Musik/"*
|
rm -rf "$HOME/Musik/"*
|
||||||
|
|
||||||
# change into music raw folder
|
# change into music raw folder
|
||||||
cd "$HOME/MusikRaw"
|
cd "$HOME/Nextcloud/MusikRaw"
|
||||||
|
|
||||||
# get directories
|
# get directories
|
||||||
ls -d */ > artistdirectories
|
ls -d */ > artistdirectories
|
||||||
@ -22,21 +22,21 @@ while read -r artdir; do
|
|||||||
|
|
||||||
# link cover.jpg
|
# link cover.jpg
|
||||||
if [[ -f cover.jpg ]]; then
|
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
|
fi
|
||||||
|
|
||||||
# make symbolic link to music
|
# make symbolic link to music
|
||||||
# if the "normalized" directory exists, links are created
|
# if the "normalized" directory exists, links are created
|
||||||
if [[ -d "normalized" ]]; then
|
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
|
fi
|
||||||
|
|
||||||
# go back to music raw
|
# go back to music raw
|
||||||
cd "$HOME/MusikRaw/$artdir"
|
cd "$HOME/Nextcloud/MusikRaw/$artdir"
|
||||||
done < directories
|
done < directories
|
||||||
# cleanup
|
# cleanup
|
||||||
rm directories
|
rm directories
|
||||||
cd "$HOME/MusikRaw"
|
cd "$HOME/Nextcloud/MusikRaw"
|
||||||
done < artistdirectories
|
done < artistdirectories
|
||||||
# cleanup
|
# cleanup
|
||||||
rm artistdirectories
|
rm artistdirectories
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# change into music raw folder
|
# change into music raw folder
|
||||||
cd "$HOME/MusikRaw"
|
cd "$HOME/Nextcloud/MusikRaw"
|
||||||
|
|
||||||
# get directories
|
# get directories
|
||||||
ls -d */ > artistdirectories
|
ls -d */ > artistdirectories
|
||||||
@ -15,11 +15,11 @@ while read -r artdir; do
|
|||||||
while read -r dir; do
|
while read -r dir; do
|
||||||
cd "$dir"
|
cd "$dir"
|
||||||
rm -rf normalized
|
rm -rf normalized
|
||||||
cd "$HOME/MusikRaw/$artdir"
|
cd "$HOME/Nextcloud/MusikRaw/$artdir"
|
||||||
done < directories
|
done < directories
|
||||||
# cleanup
|
# cleanup
|
||||||
rm directories
|
rm directories
|
||||||
cd "$HOME/MusikRaw"
|
cd "$HOME/Nextcloud/MusikRaw"
|
||||||
done < artistdirectories
|
done < artistdirectories
|
||||||
# cleanup
|
# cleanup
|
||||||
rm artistdirectories
|
rm artistdirectories
|
||||||
|
Loading…
Reference in New Issue
Block a user