tests.sh: use $OSTYPE to decide how to call luarocks

this is ridiculous
This commit is contained in:
Starbeamrainbowlabs 2022-05-25 02:14:17 +01:00
parent b94c38bb99
commit 5ac98cfa22
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 7 additions and 9 deletions

View File

@ -31,15 +31,13 @@ check_command luarocks;
luarocks_root="${PWD}/.luarocks"; luarocks_root="${PWD}/.luarocks";
# Setup the lua module path # Setup the lua module path
# eval "$(luarocks --tree "${luarocks_root}" path)"; if [[ "${OSTYPE}" == *"msys"* ]]; then
echo "PATH | ${PATH}"; PATH="$(luarocks --tree "${luarocks_root}" path --lr-bin):${PATH}";
echo "LUA_PATH | ${LUA_PATH}"; LUA_PATH="$(luarocks --tree "${luarocks_root}" path --lr-path);init.lua;./?.lua;${LUA_PATH}";
echo "LUA_CPATH | ${LUA_CPATH}"; LUA_CPATH="$(luarocks --tree "${luarocks_root}" path --lr-cpath);./?.so;${LUA_CPATH}";
else
PATH="$(luarocks --tree "${luarocks_root}" path --lr-bin):${PATH}"; eval "$(luarocks --tree "${luarocks_root}" path)";
LUA_PATH="$(luarocks --tree "${luarocks_root}" path --lr-path);init.lua;./?.lua;${LUA_PATH}"; fi
LUA_CPATH="$(luarocks --tree "${luarocks_root}" path --lr-cpath);./?.so;${LUA_CPATH}";
export PATH LUA_PATH LUA_CPATH; export PATH LUA_PATH LUA_CPATH;