Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a create script that uses plugman instead of CLI.

  • Loading branch information...
commit 745de90b58eb613ed5e29d3f71f1d5a2c94f0cc3 1 parent c298be5
@agrieve agrieve authored
Showing with 60 additions and 4 deletions.
  1. +1 −4 createmobilespec.sh
  2. +59 −0 createmobilespecandroid-usingplugman.sh
View
5 createmobilespec.sh
@@ -22,9 +22,6 @@
# It currently installs only the iOS and Android platforms.
# Based on: https://wiki.apache.org/cordova/WorkingWithThree#preview
-# TODO: Remove once CLI/plugman moves away from shelljs.exec().
-ulimit -S -n 4096
-
if [[ ! -d cordova-mobile-spec ]]; then
echo "Please run this script from the directory that contains cordova-mobile-spec"
exit 1
@@ -39,7 +36,7 @@ echo "Creating mobilespec project. If you have any errors, it may be from missin
echo "To clone needed repositories:"
echo " ./cordova-coho/coho repo-clone -r plugins -r mobile-spec -r android -r ios -r cli"
echo "To update all repositories:"
-echo " ./cordova-coho/coho repo-update -r auto"
+echo " ./cordova-coho/coho repo-update"
REPO_PARENT="$PWD"
set -e
View
59 createmobilespecandroid-usingplugman.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+# Script creates a mobilespec project that uses all local repositories.
+# It currently installs only the iOS and Android platforms.
+# Based on: https://wiki.apache.org/cordova/WorkingWithThree#preview
+
+if [[ ! -d cordova-mobile-spec ]]; then
+ echo "Please run this script from the directory that contains cordova-mobile-spec"
+ exit 1
+fi
+
+NAME=mobilespec-android
+
+if [[ -e $NAME ]]; then
+ echo "Directory \"$NAME\" already exists. Delete it first then re-run."
+ exit 1
+fi
+
+echo "Creating $NAME project. If you have any errors, it may be from missing repositories."
+echo "To clone needed repositories:"
+echo " ./cordova-coho/coho repo-clone -r plugins -r mobile-spec -r android -r ios -r plugman"
+echo "To update all repositories:"
+echo " ./cordova-coho/coho repo-update"
+REPO_PARENT="$PWD"
+set -e
+
+./cordova-android/bin/create $NAME org.apache.mobilespecplugman $NAME
+( cd cordova-js; grunt ) || exit $?
+cd $NAME
+
+set -x
+rm -r assets/www/*
+cp -r ../cordova-mobile-spec/* assets/www
+cp ../cordova-js/pkg/cordova.android.js assets/www/cordova.js
+../cordova-plugman/main.js install --platform android --project . --plugin ../cordova-mobile-spec/dependencies-plugin --searchpath "$REPO_PARENT"
+
+set +x
+echo "App created in the $NAME/ directory."
+
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.