From 17ff6be6a90b106cf383a80063ea25e8f28d8062 Mon Sep 17 00:00:00 2001 From: Anis Kadri Date: Thu, 28 Jun 2012 17:08:32 -0700 Subject: [PATCH] CB-937 fixing debug --- bin/templates/cordova/cordova | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/bin/templates/cordova/cordova b/bin/templates/cordova/cordova index 0f3e452c..0bca03f7 100755 --- a/bin/templates/cordova/cordova +++ b/bin/templates/cordova/cordova @@ -61,12 +61,15 @@ function log { adb logcat } -function debug_install { - ant debug install -} - function debug { - ant debug + if [ $(check_devices) == 0 ] ; then + ant debug install + else + ant debug + echo "##################################################################" + echo "# Plug in your device or launch an emulator with cordova/emulate #" + echo "##################################################################" + fi } function launch { @@ -75,16 +78,7 @@ function launch { } function BOOM { - clean - if [ $(check_devices) == 0 ] ; then - debug_install && launch - return - else - debug - echo "##################################################################" - echo "# Plug in your device or launch an emulator with cordova/emulate #" - echo "##################################################################" - fi + clean && debug && launch } # TODO parse arguments