Update README with note on official Oracle plugin
[nbgit.git] / test / unit / data / update-testdata
blobf7a65a03cd0d4d2dc2b0c69e3d69906960290761
1 #!/bin/sh
3 # Run all test data generator scripts.
4 # Copyright 2009 Jonas Fonseca <fonseca@diku.dk>
5 # Licensed under the GPLv2 or later
7 generators="$(dirname "$0")/generators/"
8 verbose=
9 tests=org.nbgit.*
11 HELP="$(basename "$0") [-h] [-v|--verbose] [test-pattern]"
13 match_tests() {
14 for match in "$generators/"*"$1"*; do
15 test -x "$match" && basename "$match"
16 done
19 while test $# != 0; do
20 arg="$1"; shift
22 case "$arg" in
23 -v|--verbose)
24 export NBGIT_VERBOSE=Yes
27 tests="$(match_tests "$arg")"
28 if test -z "$tests"; then
29 echo "$HELP"
30 exit 0
32 esac
33 done
35 cd "$generators/"
37 for script in $tests; do
38 echo "updating $script"
39 sh "$script"
40 done