feat: add upgrade script
This commit is contained in:
parent
b1cbacc920
commit
f322b42af2
@ -1,6 +1,6 @@
|
||||
local LIST_FILES = {
|
||||
'miner.lua',
|
||||
'old/simple-harvester.lua',
|
||||
'miner.lua',
|
||||
'inferium-upgrader.lua',
|
||||
'inferium-harvester.lua'
|
||||
};
|
||||
@ -12,6 +12,7 @@ local LIST_LIBS_FILES = {
|
||||
|
||||
local LIST_CONFIG_FILES = {
|
||||
'startup.lua',
|
||||
'upgrade.lua'
|
||||
'config/mining.lua',
|
||||
'config/harvesting.lua'
|
||||
}
|
||||
|
||||
16
upgrade.lua
Normal file
16
upgrade.lua
Normal file
@ -0,0 +1,16 @@
|
||||
local REPO_PREFIX = 'https://git.trapcloud.fr/guillaumearm/minecraft-cc-tools/raw/branch/master/'
|
||||
local INSTALL_SCRIPT_NAME = '/install.lua'
|
||||
|
||||
local DOWNLOAD_INSTALL_PATH = REPO_PREFIX .. INSTALL_SCRIPT_NAME
|
||||
|
||||
local function reinstall()
|
||||
if fs.exists(INSTALL_SCRIPT_NAME) then
|
||||
fs.delete(INSTALL_SCRIPT_NAME)
|
||||
end
|
||||
|
||||
shell.execute('wget', DOWNLOAD_INSTALL_PATH, INSTALL_SCRIPT_NAME)
|
||||
shell.execute('install')
|
||||
os.reboot()
|
||||
end
|
||||
|
||||
reinstall()
|
||||
Loading…
Reference in New Issue
Block a user