From 328e964584a5117e0eb9accf759a4f298d2179a7 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Tue, 26 Jan 2021 08:43:04 +0100 Subject: [PATCH] Add failsafe --- arch-config/scripts/pieces/multi-ffmpeg.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch-config/scripts/pieces/multi-ffmpeg.sh b/arch-config/scripts/pieces/multi-ffmpeg.sh index 2e2676c9..68a6fe74 100644 --- a/arch-config/scripts/pieces/multi-ffmpeg.sh +++ b/arch-config/scripts/pieces/multi-ffmpeg.sh @@ -36,7 +36,11 @@ while read -r dir; do fi # make symbolic link to music - ln -svf "$HOME/MusikRaw/$dir/normalized/"* "$HOME/Musik/$dir/" + # if the "normalized" directory exists, links are created + if [[ -d "normalized" ]]; then + ln -svf "$HOME/MusikRaw/$dir/normalized/"* "$HOME/Musik/$dir/" + fi + # go back to music raw cd "$HOME/MusikRaw" done < directories