Changeset 20783
- Timestamp:
- 06/20/16 16:29:49 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/jenkins/javascript/karma/scripts/specs/generate-spec.sh
r20781 r20783 1 1 #!/bin/sh 2 3 if [ -z $1 ]; then 4 echo "Usage: $0 [NUMBER[-NUMBER]][,NUMBER[-NUMBER]]..." 5 exit 1 6 fi 2 7 3 8 # Create array to store numbers of the tests … … 13 18 for range in $1; do 14 19 if [[ ! "$range" =~ "-" ]]; then # check if it is a range of numbers or just a single number 15 TESTNUMBERS+=($range) 20 if [ ! -f "$SCRIPTDIR/test$range.js" ]; then 21 >&2 echo "Warning: test$num.js does not exist." 22 else 23 TESTNUMBERS+=($range) 24 fi 16 25 else 17 26 SEQUENCE=($(seq -w -s ' ' $(sed "s/-/$IFS/" <<< ${range}))) 27 28 IFS=' ' 29 for num in ${SEQUENCE[@]}; do 30 if [ ! -f "$SCRIPTDIR/test$num.js" ]; then 31 >&2 echo "Warning: test$num.js does not exist." 32 fi 33 done 34 18 35 TESTNUMBERS=("${TESTNUMBERS[@]}" "${SEQUENCE[@]}") 19 36 fi
Note:
See TracChangeset
for help on using the changeset viewer.