From c15618f77b93a751695a416eea49c5996e1e1c59 Mon Sep 17 00:00:00 2001 From: hotio Date: Mon, 17 Jul 2017 17:47:08 +0200 Subject: [PATCH] Updated Custom Post Processing Scripts (markdown) --- Custom-Post-Processing-Scripts.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Custom-Post-Processing-Scripts.md b/Custom-Post-Processing-Scripts.md index 718fdf7..e8abc75 100644 --- a/Custom-Post-Processing-Scripts.md +++ b/Custom-Post-Processing-Scripts.md @@ -104,24 +104,25 @@ Symlinking is preferable over hardlinking in most cases as the root movie folder PERMPATH="$radarr_moviefile_path" LINKPATH="$radarr_moviefile_sourcepath" -if [ -f "$LINKPATH" ]; -then - sleep 1 + +if [[ -f "$LINKPATH" ]]; then + sleep 1 else - exit 1 + exit 1 fi + ORIGFILESIZE=$(stat -c%s "$LINKPATH") PERMFILESIZE=$(stat -c%s "$PERMPATH") sleep 30 -while [ $PERMFILESIZE != $ORIGFILESIZE ] -do - sleep 60 - PERMFILESIZE=$(stat -c%s "$PERMPATH") + +while [[ $PERMFILESIZE != $ORIGFILESIZE ]]; do + sleep 60 + PERMFILESIZE=$(stat -c%s "$PERMPATH") done -if [ $PERMFILESIZE == $ORIGFILESIZE ] -then - rm "$LINKPATH" - ln -s "$PERMPATH" "$LINKPATH" + +if [[ $PERMFILESIZE == $ORIGFILESIZE ]]; then + rm "$LINKPATH" + ln -s "$PERMPATH" "$LINKPATH" fi ``` \ No newline at end of file