diff options
author | ubq323 <ubq323@ubq323.website> | 2023-04-09 17:07:41 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2023-04-09 17:07:41 +0100 |
commit | cb960abcd79e3a659f1abedc407cb388f32d8ff8 (patch) | |
tree | 2a263366d7acdc37a335acda54c1d07eaa245453 | |
parent | b638ef3b070464f8a7c93e260d244d1516829368 (diff) |
launcher script and print info
-rwxr-xr-x | lr | 20 | ||||
-rw-r--r-- | repl.lua | 3 |
2 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,20 @@ +#!/bin/sh + +mdir="$(dirname "$(readlink $0)")" +lpath="$mdir/?.lua;$LUA_PATH" + +case "$(basename $0)" in + ljr) lua=luajit ;; + lr) lua=lua ;; + l1r) lua=lua5.1 ;; + l2r) lua=lua5.2 ;; + l3r) lua=lua5.3 ;; + l4r) lua=lua5.4 ;; + *) lua=lua ;; +esac + +# allow overriding with envvar LUA +lua=${LUA:-$lua} + +LUA_PATH="$lpath" rlwrap "$lua" "${mdir}/repl.lua" $@ + @@ -59,6 +59,9 @@ local function result(ok,...) print("error: "..(...)) end end +io.write("lua_repl_good for ".._VERSION) +if jit then io.write(" ("..jit.version..")") end +io.write"\n" while true do local f,err = read_chunk() |