Created
November 3, 2016 09:00
-
-
Save kopiro/4549829af31d2bc6f29016e1ea4a9d40 to your computer and use it in GitHub Desktop.
Install Titanium GA SDK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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