feat(install): remove listed old filed during installation
This commit is contained in:
parent
ddf028b4a4
commit
f988356750
10
install.lua
10
install.lua
@ -1,5 +1,4 @@
|
||||
local LIST_FILES = {
|
||||
'old/simple-harvester.lua',
|
||||
'miner.lua',
|
||||
'coal-crafter.lua',
|
||||
'inferium-upgrader.lua',
|
||||
@ -22,14 +21,22 @@ local LIST_CONFIG_FILES = {
|
||||
'config/inferium-plans.lua'
|
||||
}
|
||||
|
||||
-- old files that need to be cleaned up
|
||||
local LIST_OLD_FILES = {}
|
||||
|
||||
local REPO_PREFIX = 'https://git.trapcloud.fr/guillaumearm/minecraft-cc-tools/raw/branch/master/'
|
||||
|
||||
local removeFiles = function(list)
|
||||
for _, filePath in pairs(list) do
|
||||
fs.delete(filePath)
|
||||
end
|
||||
end
|
||||
|
||||
local prepareDirs = function()
|
||||
fs.makeDir('/old')
|
||||
fs.makeDir('/libs')
|
||||
fs.makeDir('/config')
|
||||
fs.makeDir('/data')
|
||||
end
|
||||
|
||||
local installFiles = function(list)
|
||||
@ -52,6 +59,7 @@ local mainSetup = function()
|
||||
local previousDir = shell.dir()
|
||||
|
||||
prepareDirs()
|
||||
removeFiles(LIST_OLD_FILES)
|
||||
installFiles(LIST_LIBS_FILES)
|
||||
installFiles(LIST_FILES)
|
||||
installConfig()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user