aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBen Combee <combee@techwood.org>2013-01-15 13:01:59 -0800
committerBen Combee <combee@techwood.org>2013-01-15 13:01:59 -0800
commitf8deb2f31bfbc39ba974806e6de1dedec65f1f59 (patch)
treedf3e23abf0d58e7b3d6b0082b0f3aa7cf57e1057 /tools
parentf848ba87d36694989a4895773c16186bbc4ce8db (diff)
parent34021f2c23f1d74fcae5a1650e1ff25ef8bdd3cd (diff)
downloadbiblez-ng-f8deb2f31bfbc39ba974806e6de1dedec65f1f59.tar.gz
Merge pull request #12 from dragongears/master
Added "--cordova-webos" command line option to tools/deploy.bat and tools/deploy.sh to deploy Enyo 2 app as a Cordova webOS app. Reviewed-By: Ben Combee (ben.combee@palm.com)
Diffstat (limited to 'tools')
-rwxr-xr-xtools/deploy.bat22
-rwxr-xr-xtools/deploy.sh19
2 files changed, 40 insertions, 1 deletions
diff --git a/tools/deploy.bat b/tools/deploy.bat
index a14879e..3138635 100755
--- a/tools/deploy.bat
+++ b/tools/deploy.bat
@@ -14,4 +14,24 @@ REM node location
SET NODE=node.exe
REM use node to invoke deploy.js with imported parameters
-%NODE% "%DEPLOY%" %* \ No newline at end of file
+%NODE% "%DEPLOY%" %*
+
+REM copy files and package if deploying to cordova webos
+:again
+if not "%1" == "" (
+
+ if "%1" == "--cordova-webos" (
+ REM copy appinfo.json and cordova*.js files
+ SET SRC=%TOOLS%..\
+ for %%A in ("%~dp0./..") do SET DEST=%TOOLS%..\deploy\%%~nA
+ copy %SRC%appinfo.json %DEST%
+ copy %SRC%cordova*.js %DEST%
+
+ REM package it up
+ if not exist %SRC%bin mkdir %SRC%bin
+ palm-package.bat %DEST% --outdir=%SRC%bin
+ )
+
+ shift
+ goto again
+)
diff --git a/tools/deploy.sh b/tools/deploy.sh
index e64aa17..e5a96e5 100755
--- a/tools/deploy.sh
+++ b/tools/deploy.sh
@@ -18,3 +18,22 @@ else
echo "No node found in path"
exit 1
fi
+
+# copy files and package if deploying to cordova webos
+while [ "$1" != "" ]; do
+ case $1 in
+ -w | --cordova-webos )
+ # copy appinfo.json and cordova*.js files
+ SRC="$TOOLS/../"
+ DEST="$TOOLS/../deploy/"${PWD##*/}
+
+ cp "$SRC"appinfo.json $DEST -v
+ cp "$SRC"cordova*.js $DEST -v
+
+ # package it up
+ mkdir -p "$DEST/bin"
+ palm-package "$DEST/bin"
+ ;;
+ esac
+ shift
+done