Skip to content

Instantly share code, notes, and snippets.

@macprince
Created October 28, 2022 16:43
Show Gist options
  • Save macprince/ad2afb8f8ea7ea746f069bf6c4b66efc to your computer and use it in GitHub Desktop.
Save macprince/ad2afb8f8ea7ea746f069bf6c4b66efc to your computer and use it in GitHub Desktop.
Script for downloading all available installers and firmware using mist-cli
#!/bin/sh
path="/Users/Shared/Mist"
mkdir -p $path/app $path/ipsw
apps=`mist list installer -o csv -q | awk -F "," '{gsub(/["=]/, "", $4);if (NR!=1){print $4}}' | sort -r`
ipsws=`mist list firmware -o csv -q | awk -F "," '{gsub(/["=]/, "", $4);if (NR!=1){print $4}}' | sort -r`
for build in $apps
do
sudo mist download installer --image-name %VERSION%-%BUILD%.dmg -o $path/app $build image
done
for build in $ipsws
do
sudo mist download firmware --firmware-name %VERSION%-%BUILD%.ipsw -o $path/ipsw $build
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment