Skip to content

Instantly share code, notes, and snippets.

@davidraedev
Created September 18, 2018 07:48
Show Gist options
  • Select an option

  • Save davidraedev/ad0e9ba724f501e320f8321c25a499c0 to your computer and use it in GitHub Desktop.

Select an option

Save davidraedev/ad0e9ba724f501e320f8321c25a499c0 to your computer and use it in GitHub Desktop.
Tsschecker bash script for easy saving
#!/bin/bash
# where the blobs should be saved
BLOB_PATH=;
# the tsschecker binary
TSSCHECKER_PATH=;
cd "$BLOB_PATH" || exit 0;
# this cache file can stick around for quite a while, so delete it since we aren't running this all the time
if [ -f /tmp/firmware.json ]; then
rm /tmp/firmware.json;
fi;
# array of device info eg: ( 'iPhone6,1:2000000000000' )
DEVICES=( );
if [ -z "$DEVICES" ]; then
echo "No Devices Specified";
exit 1;
fi;
# loop through each device and save the requested blob, leave blank to skip
for DEVICE in "${DEVICES[@]}"; do
echo 'DEVICE: '"$DEVICE";
NAME="$( echo "$DEVICE" | cut -d ":" -f 1 )";
echo 'NAME: '"$NAME";
ID="$( echo "$DEVICE" | cut -d ":" -f 2 )";
echo 'DEVICE: '"$ID";
"$TSSCHECKER_PATH" -d "$NAME" --list-ios;
echo "Saved Blobs:";
ls | grep .shsh2 | grep "$NAME" | sed 's/^[^_]*_//' | sed 's/^[^_]*_//' | cut -f1 -d"-";
echo "";
echo "select ios for $NAME [$ID]:";
read VERSION;
if [ -z "$VERSION" ]; then
echo -e "No Version Specified, skipping...\n";
else
"$TSSCHECKER_PATH" -d "$NAME" -i "$VERSION" -e "$ID" -s;
fi;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment