diff options
author | tron <tron@openttd.org> | 2007-01-05 17:42:01 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-01-05 17:42:01 +0000 |
commit | 16e3c938ba6d7cb05367fcd7beb5b07e8912c256 (patch) | |
tree | a2ba4f7bd49eed0ea0d07a7a31ecfa70f7950508 | |
parent | 9b78606d06abd69dbd2a2c9000c2b45ff7b52167 (diff) | |
download | openttd-16e3c938ba6d7cb05367fcd7beb5b07e8912c256.tar.xz |
(svn r7880) Simplify regular expressions and fix that exactly OS2 is matched, not any string beginning with OS2
-rw-r--r-- | config.lib | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/config.lib b/config.lib index 82f01a1ad..5a1c997c9 100644 --- a/config.lib +++ b/config.lib @@ -283,21 +283,21 @@ check_params() { # Check if all params have valid values # Endian only allows AUTO, LE and, BE - if ! echo $endian | grep -q "^AUTO$\|^LE$\|^BE$" + if ! echo $endian | grep -Eq "^(AUTO|LE|BE)$" then echo "configure: error: invalid option --endian=$endian" echo " Available options are: --endian=[AUTO|LE|BE]" exit 1 fi # OS only allows DETECT, UNIX, OSX, FREEBSD, MORPHOS, BEOS, SUNOS, CYGWIN, and MINGW, OS2 - if ! echo $os | grep -q "^DETECT$\|^UNIX$\|^OSX$\|^FREEBSD$\|^MORPHOS$\|^BEOS$\|^SUNOS$\|^CYGWIN$\|^MINGW$\|^OS2" + if ! echo $os | grep -Eq "^(DETECT|UNIX|OSX|FREEBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2)$" then echo "configure: error: invalid option --os=$os" echo " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|MORPHOS|BEOS|SUNOS|CYGWIN|MINGW|OS2]" exit 1 fi # enable_debug should be between 0 and 4 - if ! echo $enable_debug | grep -q "^0$\|^1$\|^2$\|^3$" + if ! echo $enable_debug | grep -q "^[0123]$" then echo "configure: error: invalid option --enable-debug=$enable_debug" echo " Available options are: --enable-debug[=0123]" |