summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2015-02-22 16:25:01 +0100
committerGubolin <gubolin@fantasymail.de>2015-02-22 16:25:01 +0100
commit13eed946d223a5c46d8857c74fd41efd9052ba01 (patch)
tree2568568950e2e3366b8555bd37a47f98989dfdb7
parent82a9e40bf889099c92f7c7e1f246fe702710c818 (diff)
downloadsnap-13eed946d223a5c46d8857c74fd41efd9052ba01.tar.gz
snap-13eed946d223a5c46d8857c74fd41efd9052ba01.zip
fix mobile.sh typo and add better info messagesv0.1.1-alpha-android
-rwxr-xr-xbinary.sh2
-rwxr-xr-xmobile.sh25
2 files changed, 15 insertions, 12 deletions
diff --git a/binary.sh b/binary.sh
index 74a8d62..9de5fa0 100755
--- a/binary.sh
+++ b/binary.sh
@@ -80,7 +80,7 @@ else
fi
# compress all js files
-find . -name '*.js' | xargs -I {} uglifyjs {} -o {} -c
+find . -name '*.js' | xargs -I {} uglifyjs {} -o {} -c 2> /dev/null
# return to the directory where the script was called from
cd "$scriptdir"
diff --git a/mobile.sh b/mobile.sh
index 0be97e3..edbf020 100755
--- a/mobile.sh
+++ b/mobile.sh
@@ -41,16 +41,17 @@ fi
# add mobile-specific library; it's made available at runtime
sed -i '/link rel="shortcut icon"/a\
- <script type="text/javascript" src="cordova.js"></script>' snap.html
+ <script type="text/javascript" src="cordova.js"></script>' snap.html
+echo "Adding cordova plugins"
# add everything needed and build for $device
-cordova platform add "$1"
+cordova platform add "$1" > /dev/null
cordova plugin add org.apache.cordova.plugin.softkeyboard \
org.apache.cordova.vibration \
org.apache.cordova.device-motion \
org.apache.cordova.device-orientation \
org.apache.cordova.geolocation \
- de.appplant.cordova.plugin.local-notification \
+ de.appplant.cordova.plugin.local-notification 2> /dev/null
if [[ $1 == "android" ]]
then
@@ -61,27 +62,29 @@ then
if [[ $crosswalk != "" ]]
then
# adapted from https://crosswalk-project.org/documentation/cordova/migrate_an_application.html#migrate
- echo "Building with Crosswalk"
+ echo "Preparing crosswalk"
rm -Rf "$builddir/platforms/android/CordovaLib/*"
cp -a $crosswalk/framework/* "$builddir/platforms/android/CordovaLib/"
cp -a "$crosswalk/VERSION" "$builddir/platforms/android/"
export ANDROID_HOME=$(dirname $(dirname $(which android)))
cd "$builddir/platforms/android/CordovaLib/"
- android update project --subprojects --target android-21 --path .
- ant debug
+ android update project --subprojects --target android-21 --path . > /dev/null
+ ant debug > /dev/null
cd "$builddir"
# prepend permissions to end of manifest
- sed -i "s,\</manifest\>,\
- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />\
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />\
- <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />\
+ sed -i "s,</manifest>,\
+ <uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />\
+ <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\
+ <uses-permission android:name=\"android.permission.INTERACT_ACROSS_USERS\" />\
</manifest>,g" \
"$builddir/platforms/android/AndroidManifest.xml"
fi
fi
-cordova build "$1"
+echo "Building application"
+cordova build "$1" > /dev/null
cd $builddir
# TODO other platforms
find -name '*.apk' | xargs -I {} mv {} $scriptdir
+echo "Finished."