2011-09-02 04:11:01 +08:00
|
|
|
#! /bin/sh
|
2012-05-05 07:47:37 +08:00
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
#
|
2011-09-02 04:11:01 +08:00
|
|
|
#
|
2012-02-02 09:45:49 +08:00
|
|
|
# Creates an app in `./bench` that posts results to http://cordova-bench.heroku.com with current cordova/Android sha.
|
2011-09-02 04:11:01 +08:00
|
|
|
#
|
|
|
|
# USAGE
|
|
|
|
# ./bin/bench
|
|
|
|
#
|
|
|
|
|
|
|
|
# clobber any existing bench
|
|
|
|
if [ -e ./bench ]
|
|
|
|
then
|
|
|
|
rm -rf ./bench
|
|
|
|
fi
|
|
|
|
|
|
|
|
# create a benching app
|
2012-02-02 09:45:49 +08:00
|
|
|
./bin/create ./bench org.apache.cordova.bench cordovaBench
|
2011-09-02 04:11:01 +08:00
|
|
|
|
|
|
|
# grab the latest bench www code
|
2012-02-02 09:45:49 +08:00
|
|
|
git clone git@github.com:brianleroux/cordova-bench.git
|
2011-09-02 04:11:01 +08:00
|
|
|
|
|
|
|
# copy it into the app
|
2012-02-02 09:45:49 +08:00
|
|
|
cat ./cordova-bench/www/index.html > ./bench/assets/www/index.html
|
|
|
|
#cat ~/Desktop/cordova-bench/www/index.html > ./bench/assets/www/index.html
|
2011-09-02 04:11:01 +08:00
|
|
|
|
|
|
|
# clean up
|
2012-02-02 09:45:49 +08:00
|
|
|
rm -rf ./cordova-bench
|
2011-09-02 04:11:01 +08:00
|
|
|
|
|
|
|
# launch to the first device found
|
|
|
|
./bin/debug ./bench
|