30 lines
624 B
Lua
30 lines
624 B
Lua
local LIST_FILES = {
|
|
'turtle-utils.lua',
|
|
'robot.lua',
|
|
'miner.lua'
|
|
};
|
|
|
|
local LIST_CONFIG_FILES = {
|
|
'startup.lua',
|
|
'config-miner.lua'
|
|
}
|
|
|
|
|
|
local REPO_PREFIX = 'https://git.trapcloud.fr/guillaumearm/minecraft-cc-tools/raw/branch/master/'
|
|
|
|
local previousDir = shell.dir()
|
|
|
|
for _, filePath in pairs(LIST_FILES) do
|
|
fs.delete(filePath)
|
|
shell.execute('wget', REPO_PREFIX .. filePath, filePath)
|
|
end
|
|
|
|
-- do not override existing config files
|
|
for _, filePath in pairs(LIST_CONFIG_FILES) do
|
|
if not fs.exists(filePath) then
|
|
shell.execute('wget', REPO_PREFIX .. filePath, filePath)
|
|
end
|
|
end
|
|
|
|
shell.setDir(previousDir)
|