Skip to content

Instantly share code, notes, and snippets.

@iflowfor8hours
Forked from sj-dan/crosflex_downloader.sh
Created September 26, 2022 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iflowfor8hours/1ec51187b3cb8540c19b272d30523ec8 to your computer and use it in GitHub Desktop.
Save iflowfor8hours/1ec51187b3cb8540c19b272d30523ec8 to your computer and use it in GitHub Desktop.
Script to fetch and download the latest version of the Chrome OS Flex image
#!/bin/bash
URLs=$(curl "https://dl.google.com/dl/edgedl/chromeos/recovery/cloudready_recovery2.json" \
-s --output - | \
grep "^.*\"url\".*$" | \
sed "s/.*\"url\": \"\(.*\)\".*$/\1/g")
printf "\nPick which channel to download your image from. Channel name is near the end of the URL.\n\n"
select URL in $URLs;
do
if [[ $URL != "" ]]; then
printf "\nDownloading now...\n\n"
curl -L -C - -O $URL && break
else
printf "\nInvalid selection, please pick one of the above displayed numbers.\n\n"
fi
done
printf "\nFinished downloading!\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment