<commit_before>rem=rem --[[
@setlocal&  set luafile="%~f0" & if exist "%~f0.bat" set luafile="%~f0.bat"
@lua5.1\bin\lua5.1.exe %luafile% %*&  exit /b ]]

local vars = {}

vars.PREFIX = [[C:\LuaRocks]]
vars.VERSION = "2.1"
vars.SYSCONFDIR = [[C:\LuaRocks]]
vars.ROCKS_TREE = [[C:\LuaRocks]]
vars.SCRIPTS_DIR = nil
vars.LUA_INTERPRETER = nil
vars.LUA_PREFIX = nil
vars.LUA_BINDIR = nil
vars.LUA_INCDIR = nil
vars.LUA_LIBDIR = nil
vars.LUA_LIBNAME = nil
vars.LUA_VERSION = "5.1"
vars.LUA_SHORTV = nil
vars.LUA_LIB_NAMES = "lua5.1.lib lua51.dll liblua.dll.a"
vars.LUA_RUNTIME = nil

local P_SET = false
local FORCE = false
local FORCE_CONFIG = false
local INSTALL_LUA = false
local USE_MINGW = false
local REGISTRY = false

---
-- Some helpers
-- 
local function die(message)
	if message then print(message) end
	print()
	print("Failed installing LuaRocks. Run with /? for help.")
	os.exit(1)
end

local function exec(cmd)
	--print(cmd)
	local status = os.execute(cmd)
	return status == 0
end

local function exists(filename)
	local cmd = [[.\bin\bin\test -e "]]..filename..[["]]
	return exec(cmd)
end

local function mkdir (dir)
	return exec([[.\bin\bin\mkdir -p "]]..dir..[[" >NUL]])<commit_msg>update installer to work on Lua 5.2<commit_after>rem=rem --[[
@setlocal&  set luafile="%~f0" & if exist "%~f0.bat" set luafile="%~f0.bat"
@lua5.1\bin\lua5.1.exe %luafile% %*&  exit /b ]]

local vars = {}

vars.PREFIX = [[C:\LuaRocks]]
vars.VERSION = "2.1"
vars.SYSCONFDIR = [[C:\LuaRocks]]
vars.ROCKS_TREE = [[C:\LuaRocks]]
vars.SCRIPTS_DIR = nil
vars.LUA_INTERPRETER = nil
vars.LUA_PREFIX = nil
vars.LUA_BINDIR = nil
vars.LUA_INCDIR = nil
vars.LUA_LIBDIR = nil
vars.LUA_LIBNAME = nil
vars.LUA_VERSION = "5.1"
vars.LUA_SHORTV = nil
vars.LUA_LIB_NAMES = "lua5.1.lib lua51.dll liblua.dll.a"
vars.LUA_RUNTIME = nil

local P_SET = false
local FORCE = false
local FORCE_CONFIG = false
local INSTALL_LUA = false
local USE_MINGW = false
local REGISTRY = false

---
-- Some helpers
-- 
local function die(message)
	if message then print(message) end
	print()
	print("Failed installing LuaRocks. Run with /? for help.")
	os.exit(1)
end

local function exec(cmd)
	--print(cmd)
	local status = os.execute(cmd)
	return (status == 0 or status == true) -- compat 5.1/5.2
end

local function exists(filename)
	local cmd = [[.\bin\bin\test -e "]]..filename..[["]]
	return exec(cmd)
end

local function mkdir (dir)
	return exec([[.\bin\bin\mkdir -p "]]..dir..[[" >NUL]])
{'fraction_non_alphanumeric': 0.1635322976287817, 'fraction_numerical': 0.016353229762878167, 'mean_word_length': 3.9735772357723578, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5161735', 'n_tokens_mistral': 1026, 'n_tokens_neox': 1016, 'n_words': 242}