# shellcheck shell=dash

# https://luarocks.org/modules/ers35/luastatic
# install globally ...

___x_cmd_lua_thirdparty_static(){
    ___x_cmd_lua_thirdparty_static___exec "$@"
}

___x_cmd_lua_thirdparty_static___exec(){
    ___x_cmd_lua_thirdparty_load_env || return 1

    local bin_suffix=
    local x_=; ___x_cmd os name_
    [ "$___X_CMD_OS_NAME_" != "win" ] || bin_suffix=.bat

    ___x_cmd_hascmd "luastatic${bin_suffix}" || {
        ___x_cmd_lua_thirdparty___install luastatic || return 1
    }

    command "luastatic${bin_suffix}" "$@"
}
