We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e32bdc1 + 3b04073 commit 99b8501Copy full SHA for 99b8501
manifests/src/update_etags.sh
@@ -4,11 +4,12 @@
4
5
input_file="$1"
6
7
-urls=$(jq .[].url "${input_file}" | tr -d '"')
+urls=$(jq '.[].url' "${input_file}" | tr -d '"')
8
9
# Pull and clean the etag from the AWS url
10
-NEW_ETAGS=$(printf "${urls}" | xargs -I {} sh -c "curl -I --silent {} | awk '/ETag:/ {print $2}' | cut -f2 -d' ' | tr -d '\"' | tr -d '\r'")
11
-
+NEW_ETAGS=$(echo "$urls" | while IFS= read -r url; do
+ curl -I --silent "$url" | awk '/ETag:/ {print $2}' | tr -d '"' | tr -d '\r'
12
+done)
13
# Format the list into json
14
JSON_LIST=$(printf '%s\n' "${NEW_ETAGS}" | jq -R . | jq -s .)
15
0 commit comments