Skip to content

Instantly share code, notes, and snippets.

@pavelgolovan
Last active November 14, 2019 11:04
Show Gist options
  • Select an option

  • Save pavelgolovan/94e5c107dc7788764e63b9318c413d80 to your computer and use it in GitHub Desktop.

Select an option

Save pavelgolovan/94e5c107dc7788764e63b9318c413d80 to your computer and use it in GitHub Desktop.
Xcode downloader. Restarts dl on failure.
#!/usr/bin/env bash
# Open https://developer.apple.com/download/more/
# Login with your app store credentials
# Open chrome dev tools -> Network
# Tap download xcode link
# On network pane right click on dl request -> Copy as cURL
# Run this script as $: dlcmd="Paste curl cmd from clipboard" output="xcode.xip" ./xcodedl.sh
ec=18
dlcmd="$dlcmd --compressed -o $output -L -C -"
while [ $ec -ne 0 ];
do eval "${dlcmd}";
ec=$?;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment