mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00

Add a Ruby script mode to `tool/missing-baseruby.bat` that checks if `RUBY_VERSION` meets the required version. This will enable similar checks on mswin as well.
19 lines
438 B
Batchfile
Executable file
19 lines
438 B
Batchfile
Executable file
:"" == "
|
|
@echo off || (
|
|
:warn
|
|
echo>&2.%~1
|
|
goto :eof
|
|
:abort
|
|
exit /b 1
|
|
)||(
|
|
:)"||(
|
|
s = %^#
|
|
)
|
|
: ; call() { local call=${1#:}; shift; $call "$@"; }
|
|
: ; warn() { echo "$1" >&2; }
|
|
: ; abort () { exit 1; }
|
|
|
|
call :warn "executable host ruby is required. use --with-baseruby option."
|
|
call :warn "Note that BASERUBY must be Ruby 3.0.0 or later."
|
|
call :abort
|
|
: || (:^; abort if RUBY_VERSION < s[%r"warn .*Ruby ([\d.]+)(?:\.0)?",1])
|