Skip to content

Instantly share code, notes, and snippets.

@aslafy-z
Last active October 7, 2025 10:17
Show Gist options
  • Save aslafy-z/7bcc1faa6bd97d7bea59ce285d9806e1 to your computer and use it in GitHub Desktop.
Save aslafy-z/7bcc1faa6bd97d7bea59ce285d9806e1 to your computer and use it in GitHub Desktop.
#!/bin/bash
BASE_URL="https://prod.download.desktop.kiro.dev/releases"
PREFIXES=("20250724" "20250723" "20250722" "20250721" "20250720" "20250719" "20250718")
DISTRO="distro-linux-x64"
MAX_JOBS=10 # Number of parallel jobs
>/tmp/status
# Generate all candidate timestamps
generate_candidates() {
for PREFIX in "${PREFIXES[@]}"; do
for HOUR in $(seq -w 0 23); do
for MIN in $(seq -w 0 59); do
echo "${PREFIX}${HOUR}${MIN}"
done
done
done
}
# Check one URL
check_url() {
FULL="$1"
URL="${BASE_URL}/${FULL}--${DISTRO}-tar-gz/${FULL}-${DISTRO}.tar.gz"
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -I "$URL")
echo -n 1 >>/tmp/status
if [[ "$HTTP_CODE" == "200" ]]; then
echo "✅ Found: $URL"
fi
}
export -f check_url
export BASE_URL DISTRO EXT
generate_candidates | xargs -P "$MAX_JOBS" -I {} bash -c 'check_url "$@"' _ {}
@aslafy-z
Copy link
Author

aslafy-z commented Oct 7, 2025

@elvisoliveira Nice! Thank you for sharing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment