mirror of
https://github.com/chocolate-doom/chocpkg.git
synced 2025-01-22 00:11:10 +00:00
Get rid of pattern_match function.
This functionality is built into bash through the [[..]] syntax.
This commit is contained in:
parent
4ecf868faa
commit
0225fd6f7d
2 changed files with 1 additions and 16 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue