SHA256
10
0
forked from pool/lua-macros
Files
lua-macros/install-lua-rock.sh
2025-10-21 00:38:19 +02:00

16 lines
376 B
Bash
Executable File

#!/bin/bash
set -ex
# 1. %{lua_version}
# 2. %{buildroot}%{_prefix}
# 3. %{buildroot}%{luarocks_treedir}/%{mod_name}
SOURCE_DIR="$3"
luarocks --lua-version="$1" --tree="$2" install --deps-mode=none --no-manifest "${*:$#}"
if [ -d "${SOURCE_DIR}" ] && [ "$(find "${SOURCE_DIR}" -type f | wc -l)" -gt 0 ]
then
mkdir -p __rocktree
mv -v "${SOURCE_DIR}"/*/* __rocktree
fi