Index: trunk/tools/mwmultiversion/scripts/mwversionsinuse |
— | — | @@ -1,12 +1,12 @@ |
2 | 2 | #!/bin/sh |
3 | | -# Returns a space separated list of all active MW versions (e.g. x.xx). |
| 3 | +# Returns a space separated list of all active MW versions (e.g. "x.xx"). |
4 | 4 | # This script belongs in /usr/bin/ and should be in PATH. |
5 | 5 | declare -a mwVersionsionNums |
6 | 6 | while read line |
7 | 7 | do |
8 | 8 | mwVersion=${line#* } |
9 | 9 | mwVersionNum=${mwVersion#*-} |
10 | | - if [ -n "$mwVersion" -a -n "$mwVersionNum" ]; then |
| 10 | + if [ -n "$mwVersionNum" ]; then |
11 | 11 | mwVersionInArray=0 |
12 | 12 | for i in "${mwVersionsionNums[@]}" |
13 | 13 | do |
— | — | @@ -15,11 +15,10 @@ |
16 | 16 | break |
17 | 17 | fi |
18 | 18 | done |
19 | | - if [ mwVersionInArray -eq 0 ]; then |
20 | | - mwVersionsionNums=("${mwVersionsionNums[@]}" mwVersionNum) |
| 19 | + if [ $mwVersionInArray -eq 0 ]; then |
| 20 | + mwVersionsionNums=("${mwVersionsionNums[@]}" "$mwVersionNum") |
21 | 21 | fi |
22 | 22 | else |
23 | | - echo "" |
24 | 23 | exit 1 |
25 | 24 | fi |
26 | 25 | done < /usr/local/apache/common-local/wmf-config/wikiversions.cdb |