can copy out mod packs now

This commit is contained in:
2026-09-11 04:47:16 -06:00
parent 623debaf1a
commit fc9fd385fc
2 changed files with 17 additions and 4 deletions
+16 -3
View File
@@ -4,6 +4,19 @@ local utility = require "utility"
local data = utility.load_data("info.json")
local copy_pack_mods = function(pack_name, destination_path)
os.execute("mkdir -p " .. destination_path:enquote())
local pack_mods = data.packs[pack_name].mods
for mod_name in pairs(pack_mods) do
local source = ("mods" .. utility.path_separator .. mod_name):enquote()
local target = (destination_path .. utility.path_separator .. mod_name):enquote()
os.execute("cp -r " .. source .. " " .. target)
end
end
local check_dependencies = function(pack_name)
local pack_mods = data.packs[pack_name].mods
@@ -58,7 +71,7 @@ local standardize_data = function()
end
end
check_dependencies("Unnamed Luanti TechAge Pack")
copy_pack_mods("Unnamed Luanti TechAge Pack", "../Luanti_Servers/mods")
standardize_data()
utility.save_data(data)
-- standardize_data()
-- utility.save_data(data)