SHA256
10
0
forked from pool/lua-macros
Files
lua-macros/install-lua-rock.sh
Matěj Cepl 60b20c88fb Rewrite %luarocks_install to use a shell script
install-lua-rock.sh, which is packaged as well.
2025-10-21 00:05:32 +02:00

16 lines
374 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