Get rid of pattern_match function.

This functionality is built into bash through the [[..]] syntax.
This commit is contained in:
Simon Howard 2016-02-24 21:24:09 -05:00
parent 4ecf868faa
commit 0225fd6f7d
2 changed files with 1 additions and 16 deletions

View file

@ -1,18 +1,3 @@
# Check if the specified string matches the glob pattern.
pattern_match() {
pattern="$1"
case "$2" in
$pattern)
true
;;
*)
false
;;
esac
}
# Determine if a given program is in the PATH.
have_tool() {
tool=$1

View file

@ -11,7 +11,7 @@ if [ $(uname) = "Darwin" ]; then
fi
# When targeting Windows, we need to install the directx headers first.
if [ $(uname) = "Cygwin" ] || pattern_match "*mingw*" "$BUILD_HOST"; then
if [ $(uname) = "Cygwin" ] || [[ "$BUILD_HOST" = *mingw* ]]; then
DEPENDENCIES="directx-devel"
config_options+=" --disable-directx"
fi