1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-07-04 19:52:44 +00:00

improve lua test

This commit is contained in:
skywind3000
2019-02-25 11:01:00 +08:00
parent 5ba0e50894
commit 472925ac92
+8 -8
View File
@@ -6,14 +6,14 @@ ZLUA_SCRIPT="${0:A:h}/z.lua"
# search lua executable
if [[ -z "$ZLUA_EXEC" ]]; then
if [[ -x "$(\which lua)" ]]; then
ZLUA_EXEC="$(\which lua)"
elif [[ -x "$(which lua5.3)" ]]; then
ZLUA_EXEC="$(\which lua5.3)"
elif [[ -x "$(which lua5.2)" ]]; then
ZLUA_EXEC="$(\which lua5.2)"
elif [[ -x "$(which lua5.1)" ]]; then
ZLUA_EXEC="$(\which lua5.1)"
if [[ -x "$(command which lua)" ]]; then
ZLUA_EXEC="$(command which lua)"
elif [[ -x "$(command which lua5.3)" ]]; then
ZLUA_EXEC="$(command which lua5.3)"
elif [[ -x "$(command which lua5.2)" ]]; then
ZLUA_EXEC="$(command which lua5.2)"
elif [[ -x "$(command which lua5.1)" ]]; then
ZLUA_EXEC="$(command which lua5.1)"
else
echo "Not find lua in your $PATH, please install it."
return