diff options
| author | Cameron <cysmith1010@gmail.com> | 2016-10-10 14:30:51 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-10 14:30:51 -0600 |
| commit | 6155e8de0cfd6117a4804c18a64b75d52e0ae21c (patch) | |
| tree | 726156de0625deab35d2e5aec0529de66efcc868 /stylize_video.sh | |
| parent | 617bfd59e1f8df74e5d5dca170abc2e3b4fffc64 (diff) | |
Check directory exists before removal
Diffstat (limited to 'stylize_video.sh')
| -rw-r--r-- | stylize_video.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/stylize_video.sh b/stylize_video.sh index cb8698c..082fc9d 100644 --- a/stylize_video.sh +++ b/stylize_video.sh @@ -45,6 +45,9 @@ style_image="$2" style_dir=$(dirname "$style_image") style_filename=$(basename "$style_image") +if [ ! -d "./video_input" ]; then + mkdir ./video_input +fi temp_dir="./video_input/${content_filename}" # Create output folder @@ -81,4 +84,6 @@ echo "Converting image sequence to video. This should be quick..." $FFMPEG -v quiet -i ./video_output/frame_%04d.ppm ./video_output/${content_filename}-stylized.$extension # Clean up garbage -rm -rf "${temp_dir}"
\ No newline at end of file +if [ -d "${temp_dir}" ]; then + rm -rf "${temp_dir}" +fi |
