From cb960abcd79e3a659f1abedc407cb388f32d8ff8 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sun, 9 Apr 2023 17:07:41 +0100 Subject: launcher script and print info --- lr | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 lr (limited to 'lr') diff --git a/lr b/lr new file mode 100755 index 0000000..9158f02 --- /dev/null +++ b/lr @@ -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" $@ + -- cgit v1.2.3