From f211596f99f9fd521a62435a0bfa9d7c946f68b8 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sun, 17 Jul 2022 17:03:54 -0300 Subject: [PATCH] create src directory when it doesn't already exist. --- bin/json/private/al-quran | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/json/private/al-quran b/bin/json/private/al-quran index 168147f..8df171b 100755 --- a/bin/json/private/al-quran +++ b/bin/json/private/al-quran @@ -21,6 +21,7 @@ require "net/http" require "nokogiri" require "json" require "paint" +require "fileutils" require_relative "../../../binlib/io/line" ## @@ -73,6 +74,7 @@ end end sleep(delay) end + FileUtils.mkdir_p(File.dirname(dest)) File.binwrite(format(dest, chapter:), JSON.pretty_generate(rows)) line.end.print(Paint["Done.", :bold]) .end.end