updated to create dir if not exists

This commit is contained in:
2025-10-30 18:34:53 -04:00
parent cd46b36554
commit 21b69fd8d4

View File

@@ -30,7 +30,11 @@ VERSION=$(echo ${HTML_SOURCE} | jq -r .tag_name)
# get assets # get assets
ASSETS=$(echo ${HTML_SOURCE} | jq -r .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) name=$(echo ${i} | jq -r .name)
downloadUrl=$(echo ${i} | jq -r .browser_download_url) downloadUrl=$(echo ${i} | jq -r .browser_download_url)
if [ ${name} == 'scrutiny-collector-metrics-linux-amd64' ]; then if [ ${name} == 'scrutiny-collector-metrics-linux-amd64' ]; then