can copy out mod packs now
This commit is contained in:
+16
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user