View difference between Paste ID: Ucau2BXT and UzGHLbNC
SHOW: | | - or go back to the newest paste.
1
install = {
2
  title = 'Opus OS',
3
  version = '1.0',
4
  author = 'Kepler',
5
  description = [[
6
A user friendly operating system featuring multitasking, networking, and automation
7
]],
8
  license = [[
9
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
11
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
13
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.]],
14
  copyrightYear = 2018,
15
  copyrightHolders = 'Kepler',
16
  diskspace = 380000,
17
  rebootAfter = true,
18
  gitRepo = 'kepler155c/opus',
19
  gitBranch = 'develop-1.8',
20
  branches = {
21
    { branch = 'develop-1.8', description = '1.8+ Unstable' },
22
    { branch = 'master-1.8',  description = '1.8+ Stable'   },
23
    { branch = 'master',      description = '1.7x Stable'   },
24
    { branch = 'develop',     description = '1.7x Unstable' },
25
  },
26
  preCopy = function(mode)
27
    if mode == 'update' then
28
      fs.delete('sys')
29
    end
30
  end,
31
  steps = {
32
    install = {
33
      'splash',
34
      'license',
35
      'branch',
36
      'files',
37
      'review',
38
      'install',
39
    },
40
    update = {
41
      'branch',
42
      'review',
43
      'install',
44
    },
45
    automatic = {
46
      'install',
47
    },
48
    uninstall = {
49
      'review',
50
      'uninstall',
51
    },
52
  },
53
}
54
55
print('Downloading Installer...')
56
57
local url ='https://raw.githubusercontent.com/kepler155c/opus-installer/master/sys/apps/Installer.lua'
58
local h = _G.http.get(url)
59
if not h then
60
  error('Failed to download installer')
61
end
62
63
local contents = h.readAll()
64
if not contents then
65
  error('Failed to download installer')
66
end
67
68
local fn, msg = load(contents, 'Installer.lua', nil, _ENV)
69
if not fn then
70
  _G.printError(msg)
71
else
72
  local args = { ... }
73
  fn(args[1])
74
end