#!/bin/bash # Update quiXzoom.com footer with all markets echo "=== Updating quiXzoom.com Footer ===" # Download current index.html (follow redirects) curl -sL https://www.quixzoom.com > /tmp/quixzoom-current.html # Check if download succeeded if [ ! -s /tmp/quixzoom-current.html ]; then echo "❌ Failed to download quixzoom.com" exit 1 fi echo "✓ Downloaded current site ($(wc -c < /tmp/quixzoom-current.html) bytes)" # Extract everything BEFORE # Find the last or just before if grep -q '' /tmp/quixzoom-current.html; then # Extract up to and including sed -n '1,/<\/footer>/p' /tmp/quixzoom-current.html | sed '$d' > /tmp/quixzoom-new.html echo "✓ Found existing footer, replacing..." else # No footer found, extract up to sed -n '1,/<\/body>/p' /tmp/quixzoom-current.html | sed '$d' > /tmp/quixzoom-new.html echo "⚠ No existing footer found, inserting before " fi # Add new footer cat /home/bernt/.openclaw/workspace/quixzoom-footer-new.html >> /tmp/quixzoom-new.html # Add closing tags echo "" >> /tmp/quixzoom-new.html echo "" >> /tmp/quixzoom-new.html # Verify the new file SIZE=$(wc -c < /tmp/quixzoom-new.html) echo "✓ New file size: $SIZE bytes" # Upload to S3 echo "Uploading to S3..." aws s3 cp /tmp/quixzoom-new.html s3://quixzoom-prod/index.html --content-type text/html --cache-control "max-age=3600" # Also upload to www subdomain if different bucket aws s3 cp /tmp/quixzoom-new.html s3://www.quixzoom.com/index.html --content-type text/html --cache-control "max-age=3600" 2>/dev/null || true # Invalidate CloudFront echo "Invalidating CloudFront..." INVALIDATION_ID=$(aws cloudfront create-invalidation --distribution-id E2M3J95HLUR89H --paths "/*" --query 'Invalidation.Id' --output text) echo "✓ Invalidation created: $INVALIDATION_ID" echo "" echo "✅ Footer updated with all 19 markets!" echo "" echo "Market status:" echo " 🟢 LIVE (3): Sweden, UK, Netherlands" echo " 🟡 REDIRECT (5): EU, Italy, Japan, Mexico, Latin America" echo " 🔵 COMING SOON (11): Spain, Germany, France, Switzerland, Denmark, Finland, Belgium, India, Thailand, Nigeria, Kenya"