From 75be99058ed87dbc3ab2baaa3e64e77376054de9 Mon Sep 17 00:00:00 2001 From: alban Date: Sun, 27 Oct 2019 01:21:00 +0200 Subject: [PATCH] [fix] mkdir mess --- flickr.sh | 2 +- img_generator.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flickr.sh b/flickr.sh index 5a0db80..5fe4c37 100644 --- a/flickr.sh +++ b/flickr.sh @@ -49,7 +49,7 @@ for i in $( seq 1 $(( ${#FILELIST[@]} -1 )) ); do composite ${FILELIST[$i]} $SYNTH_NAME -gravity center -compose difference "$SYNTH_NAME" done -mkdir -p logs +[ ! -d logs ] && mkdir -p logs echo "File generated with word $WORD and ${#FILELIST[@]} images: file://$PWD/$SYNTH_NAME" | tee "logs/$(basename $SYNTH_NAME)" echo "${FILELIST[@]}" | tee -a "logs/$(basename $SYNTH_NAME)" diff --git a/img_generator.sh b/img_generator.sh index e04bda3..1fca4a8 100755 --- a/img_generator.sh +++ b/img_generator.sh @@ -49,7 +49,7 @@ for i in $( seq 1 $(( ${#FILELIST[@]} -1 )) ); do composite ${FILELIST[$i]} $SYNTH_NAME -gravity center -compose difference "$SYNTH_NAME" done -mkdir logs +mkdir -p logs echo "File generated with word $WORD and ${#FILELIST[@]} images: file://$PWD/$SYNTH_NAME" | tee "logs/$(basename $SYNTH_NAME)" echo "${FILELIST[@]}" | tee -a "logs/$(basename $SYNTH_NAME)"