diff options
author | Peter Melnichenko <mpeterval@gmail.com> | 2016-10-14 23:45:15 +0300 |
---|---|---|
committer | Peter Melnichenko <mpeterval@gmail.com> | 2016-10-14 23:53:34 +0300 |
commit | 23043499b9a5423ecbc19e968142df17dc5d15d1 (patch) | |
tree | 6d7cccaf57194ee2e5054013b2c440732d6819ed /configure | |
parent | 5610025dfdda1f58d9ee201ef2b32e63bd612c6d (diff) | |
download | luarocks-23043499b9a5423ecbc19e968142df17dc5d15d1.tar.gz luarocks-23043499b9a5423ecbc19e968142df17dc5d15d1.tar.bz2 luarocks-23043499b9a5423ecbc19e968142df17dc5d15d1.zip |
Relax Lua version detection to support Ravi
Ravi has "Ravi 5.3" as _VERSION. Don't use _VERSION:sub(5) to get Lua
version, match " (5%.[123])$" instead.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -226,8 +226,8 @@ then | |||
226 | fi | 226 | fi |
227 | 227 | ||
228 | detect_lua_version() { | 228 | detect_lua_version() { |
229 | detected_lua=`$1 -e 'print(_VERSION:sub(5))' 2> /dev/null` | 229 | detected_lua=`$1 -e 'print(_VERSION:match(" (5%.[123])$"))' 2> /dev/null` |
230 | if [ "$detected_lua" = "5.1" -o "$detected_lua" = "5.2" -o "$detected_lua" = "5.3" ] | 230 | if [ "$detected_lua" != "nil" ] |
231 | then | 231 | then |
232 | echo "Lua version detected: $detected_lua" | 232 | echo "Lua version detected: $detected_lua" |
233 | if [ "$LUA_VERSION_SET" != "yes" ] | 233 | if [ "$LUA_VERSION_SET" != "yes" ] |