Skip to content

Commit

Permalink
Fix update.sh to correctly parse updated HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
JustDerb committed Sep 11, 2024
1 parent 124b757 commit fd4f8e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ TMP_DIR=$(mktemp -d)

if [ ${URL} == "auto" ]; then
echo "Automatically determining latest AWS Simple Icons URL..."
URL=$(curl -s https://aws.amazon.com/architecture/icons/ | grep 'Asset Package&nbsp;<i class="icon-download"></i>' | head -n1 | grep -oEi '//.*\.zip' | while read line; do echo "https:$line"; done)
URL=$(curl -s https://aws.amazon.com/architecture/icons/ | grep 'Icon package' | head -n1 | grep -oEi '//[^"]+Package[^"]+\.zip' | while read line; do echo "https:$line"; done)
echo "Latest URL: ${URL}"
if [ -z "${URL}" ]; then
echo "Got empty URL; the parsing might be broken!"
exit 1
fi
# Source the metadata file which holds our current state
. ./metadata.config
Expand Down

0 comments on commit fd4f8e6

Please sign in to comment.