Skip to content

Instantly share code, notes, and snippets.

@kopiro
Created November 3, 2016 09:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kopiro/4549829af31d2bc6f29016e1ea4a9d40 to your computer and use it in GitHub Desktop.
Save kopiro/4549829af31d2bc6f29016e1ea4a9d40 to your computer and use it in GitHub Desktop.
Install Titanium GA SDK
#!/bin/bash
# Usage sdkinstall "5.5.0 5.5.1"
rm -rf /tmp/tisdk
mkdir -p /tmp/tisdk
function install_sdk() {
if [ -d ~/Library/Application\ Support/Titanium/mobilesdk/osx/$2 ]; then
echo "Titanium SDK $2 already installed!"
else
echo "Installing Titanium SDK $2"
if [ ! -f /tmp/tisdk/$2.zip ]; then
echo "Downloading..."
curl $1 -o /tmp/tisdk/$2.zip
fi
unzip /tmp/tisdk/$2.zip -d /tmp/tisdk/$2
mv /tmp/tisdk/$2/mobilesdk/osx/$2 ~/Library/Application\ Support/Titanium/mobilesdk/osx
fi
}
echo "Downloading original SDK..."
for sdk in "$1"; do
sdkf="$sdk.GA"
install_sdk "http://builds.appcelerator.com/mobile-releases/$sdk/mobilesdk-$sdkf-osx.zip" $sdkf
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment