From 127943e70249dda359e276e9f683b36cdfdfb448 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Wed, 10 Apr 2019 22:22:53 +0200 Subject: [PATCH] create the dir if not existing --- lib.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib.sh b/lib.sh index d53b8971..2bfc798e 100644 --- a/lib.sh +++ b/lib.sh @@ -211,6 +211,10 @@ site_200() { # 2 = name of file # 3 = directory that the file should end up in curl_to_dir() { +if [ ! -d "$3" ] +then + mkdir -p "$3" +fi check_command curl -sSL "$1"/"$2" -o "$3"/"$2" }