mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-25 04:22:07 +00:00
`api.token.raw` is only defined starting with Bison 3.5 Since it's not essential, define it on the command-line iff the Bison version is sufficient.
8 lines
231 B
Bash
Executable File
8 lines
231 B
Bash
Executable File
#!/bin/sh
|
|
bison -V | awk '
|
|
/^bison.*[0-9]+(\.[0-9]+){1,2}$/ {
|
|
match($0, /[0-9]+(\.[0-9]+){1,2}$/);
|
|
split(substr($0, RSTART), ver, ".");
|
|
if (ver[1] == major && ver[2] >= minor) { exit 0 } else { exit 1 }
|
|
}' major="$1" minor="$2"
|