| #!/bin/bash |
| |
| # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| usage() { |
| echo "Usage: $0 <version-tag>" |
| } |
| |
| if [[ $# -lt 1 ]]; then |
| usage |
| exit 0 |
| fi |
| |
| PACKAGENAME=o3d-tests-${1} |
| |
| # source locations and revisions, taken from the original DEPS file |
| SELENIUMRC="http://o3d.googlecode.com/svn/trunk/googleclient/third_party/selenium_rc@178" |
| SELENIUMRCTO="O3D/third_party/selenium_rc" |
| SELENTESTS="http://src.chromium.org/svn/trunk/src/o3d/tests/selenium@44717" |
| SELENTESTSTO="O3D/o3d/tests/selenium" |
| O3DSAMPLES="http://src.chromium.org/svn/trunk/src/o3d/samples@46579" |
| O3DSAMPLESTO="O3D/o3d/samples" |
| O3D_ASSETS="http://o3d.googlecode.com/svn/trunk/googleclient/o3d_assets/tests@155" |
| O3D_ASSETSTO="O3D/o3d/o3d_assets/tests" |
| GOOGLEFLAG="http://google-gflags.googlecode.com/svn/trunk@29" |
| GOOGLEFLAGTO="O3D/o3d/third_party/gflags" |
| |
| function update_mirror() { |
| LOCALMIRROR=$1 |
| [ -z "${LOCALMIRROR}" ] && return 0 |
| |
| echo -n "Update local mirror? [yn] " |
| read n |
| if [[ "$n" == "y" ]]; then |
| cp "o3d-svn-${SVNREV}.tar.gz" ${LOCALMIRROR} |
| fi |
| } |
| |
| function download_stuff() { |
| FILESDIR=`dirname $0` |
| |
| echo "Getting O3D stuff" |
| for sub in SELENIUMRC SELENTESTS O3DSAMPLES O3D_ASSETS GOOGLEFLAG; do |
| eval svn export \$\{${sub}\} \$\{${sub}TO\} |
| done |
| |
| tar -cvjf ${PACKAGENAME}.tar.bz2 O3D |
| } |
| |
| download_stuff "$@" |
| update_mirror |
| |