Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
branch_name=$(git branch | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/")
echo "Removing old cordova directory"
rm -rf cordova
echo "Creating cordova app to ${branch_name}..."
echo "WARNING: say 'no' to the next prompts"
ember generate cordova-init "my.company.${branch_name}" --platform=android
cd cordova
if [[ -n "$JAVA_HOME" ]]; then
cordova platform rm android
cordova platform add android
fi
if [[ "$OSTYPE" == "msys" ]]; then
cordova platform rm windows
cordova platform rm wp8
cordova platform add windows
cordova platform add wp8
elif [[ "$OSTYPE" == "darwin"* ]]; then
cordova platform rm ios
cordova platform add ios
fi
cordova plugin rm org.apache.cordova.file
cordova plugin rm com.jamiestarke.webviewdebug
cordova plugin rm org.apache.cordova.device
cordova plugin rm com.phonegap.plugins.PushPlugin
cordova plugin rm com.mesmotronic.plugins.fullscreen
cordova plugin rm cordova-plugin-inappbrowser
cordova plugin add https://github.com/digitalpages/cordova-plugin-file.git
cordova plugin add org.apache.cordova.device
cordova plugin add https://github.com/jrstarke/webview-debug.git
cordova plugin add https://github.com/dukex/PushPlugin.git
cordova plugin add https://github.com/raulsouzalima/cordova-fullscreen-plugin.git
cordova plugin add https://github.com/apache/cordova-plugin-inappbrowser.git
git checkout .
echo "DONE!"
echo "run: ember cordova:build"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment