Skip to content

Commit

Permalink
refactor: style change to script
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed Feb 10, 2017
1 parent b0640ea commit b849936
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions testbed/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,34 @@ main() {
gulp prod

# clean
if [[ "$run_cor" == "true" ]]; then npm install -g cordova; fi
if [[ "$run_dep" == "true" ]]; then npm uninstall mkpath node-version-compare plist xml2js; fi
if [[ "$run_cor" == "true" ]]; then
npm install -g cordova
fi
if [[ "$run_dep" == "true" ]]; then
npm uninstall mkpath node-version-compare plist xml2js
fi
rm -rf ../.installed
rm -rf ./plugins
rm -rf ./platforms

# build (platforms added before plugin because before_plugin_install does not work on file reference)
if [[ "$run_ios" == "true" ]]; then cordova platform add ios; fi
if [[ "$run_and" == "true" ]]; then cordova platform add android; fi
if [[ "$run_ios" == "true" ]]; then
cordova platform add ios
fi
if [[ "$run_and" == "true" ]]; then
cordova platform add android
fi

# plugin
cordova plugin add ../

# run
if [[ "$run_ios" == "true" ]]; then cordova build ios && open -a Xcode platforms/ios/Branch\ Testing.xcworkspace; fi
if [[ "$run_and" == "true" ]]; then cordova run android; fi
if [[ "$run_ios" == "true" ]]; then
cordova build ios && open -a Xcode platforms/ios/Branch\ Testing.xcworkspace
fi
if [[ "$run_and" == "true" ]]; then
cordova run android
fi
}

options "$@"
Expand Down

0 comments on commit b849936

Please sign in to comment.