auto upgrade packages on base opus update - github actions wip

This commit is contained in:
kepler155c@gmail.com
2020-04-30 18:51:36 -06:00
parent e116caf16e
commit 287adb1235
13 changed files with 77 additions and 47 deletions

View File

@@ -1,24 +1,9 @@
local fs = _G.fs
local fs = _G.fs
local shell = _ENV.shell
local function deleteIfExists(path)
if fs.exists(path) then
fs.delete(path)
print("Deleted outdated file at: "..path)
end
if fs.exists('.opus_upgrade') then
fs.delete('.opus_upgrade')
print('Updating packages')
shell.run('package updateall')
os.reboot()
end
-- cleanup outdated files
deleteIfExists('sys/apps/shell')
deleteIfExists('sys/etc/app.db')
deleteIfExists('sys/extensions')
deleteIfExists('sys/network')
deleteIfExists('startup')
deleteIfExists('sys/apps/system/turtle.lua')
deleteIfExists('sys/autorun/gps.lua')
deleteIfExists('sys/autorun/gpshost.lua')
deleteIfExists('sys/apps/network/redserver.lua')
deleteIfExists('sys/apis')
deleteIfExists('sys/autorun/apps.lua')
deleteIfExists('sys/init/6.tl3.lua')
-- remove this file
-- deleteIfExists('sys/autorun/upgraded.lua')