From 21b69fd8d4b649b3a18ae8576cee1e1a925a7ee5 Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Thu, 30 Oct 2025 18:34:53 -0400 Subject: [PATCH] updated to create dir if not exists --- scrutinty.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scrutinty.sh b/scrutinty.sh index b87b98d..d2742eb 100644 --- a/scrutinty.sh +++ b/scrutinty.sh @@ -30,7 +30,11 @@ VERSION=$(echo ${HTML_SOURCE} | jq -r .tag_name) # get assets ASSETS=$(echo ${HTML_SOURCE} | jq -r .assets[]) -jq -c .assets[] <<< ${HTML_SOURCE}| while read i; do +if [ ! -d "${SCRUTINY_DIRECTORY}" ]; then + mkdir "${SCRUTINY_DIRECTORY}" +fi + +jq -c .assets[] <<< ${HTML_SOURCE} | while read i; do name=$(echo ${i} | jq -r .name) downloadUrl=$(echo ${i} | jq -r .browser_download_url) if [ ${name} == 'scrutiny-collector-metrics-linux-amd64' ]; then