From 5dbada192d1a082d234a7dda3fc3230ba57eb57f Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 7 May 2021 12:57:07 -0400 Subject: [PATCH] added many --- run.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/run.sh b/run.sh index b1afcc4..6bc925b 100644 --- a/run.sh +++ b/run.sh @@ -1,11 +1,13 @@ #!/bin/bash set +x -if [[ -z "${URL}" ]] -then - echo "Please defind a URL" - exit 1 -fi +URLs=$(export | grep URL) + +#if [[ -z "${URL}" ]] +#then +# echo "Please defind a URL" +# exit 1 +#fi if [[ -z "${BUNNYCDN_API}" ]] then @@ -13,7 +15,9 @@ then exit 1 fi +for f in ${URLs | cut -d'=' -f2-) curl -s -X POST \ -H 'AccessKey: '"${BUNNYCDN_API}"'' \ -H 'Content-Length: 0' \ - 'https://api.bunny.net/purge?url='"${URL}" + 'https://api.bunny.net/purge?url='"${f}" +done