Last active
August 29, 2015 13:57
-
-
Save sukima/9494083 to your computer and use it in GitHub Desktop.
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 | |
tmpdir=`mktemp -dt ios-sim.XXX` | |
buildpath="./build/Release/ios-sim" | |
destdir="$HOME/Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/iphone" | |
success=false | |
pushd $tmpdir | |
git clone [email protected]:phonegap/ios-sim.git . | |
npm install . | |
if [ -e "${buildpath}" ]; then | |
mv "${destdir}/ios-sim" "${destdir}/ios-sim.orig" | |
if [ -e "${destdir}/ios-sim.orig" ]; then | |
cp "${buildpath}" "${destdir}/ios-sim" | |
success=true | |
fi | |
fi | |
popd | |
if $success; then | |
rm -rf $tmpdir | |
else | |
echo "There was a problem with the build. Please try manually." >&2 | |
echo "ios-sim in ${buildpath}" >&2 | |
echo "Titanium destination: ${destdir}" >&2 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment