-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathscript
More file actions
38 lines (34 loc) · 1.66 KB
/
script
File metadata and controls
38 lines (34 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
local shell = require "shell"
local default_repo = "https://gitee.com/sh0aky/assembly-line/raw"
local default_branch = "master"
local template = "wget %s/%s"
local args, _ = shell.parse(...)
local repo;
local branch;
if type(args) == "table" then
repo = args[1] or default_repo
branch = args[2] or default_branch
else
repo = default_repo
branch = default_branch
end
shell.execute("rm -rf ./assembly-line")
shell.execute("mkdir assembly-line")
local pwd = shell.getWorkingDirectory()
local dir = pwd .. "/assembly-line"
shell.setWorkingDirectory(dir)
local prefix = string.format(template, repo, branch)
shell.execute(prefix .. "/src/main.lua")
shell.execute(prefix .. "/src/manager.lua")
shell.execute(prefix .. "/src/initializer.lua")
shell.execute("mkdir chest conf recipe util")
shell.execute(prefix .. "/src/chest/reader.lua " .. dir .. "/chest/reader.lua")
shell.execute(prefix .. "/src/conf/config.lua " .. dir .. "/conf/config.lua")
shell.execute(prefix .. "/src/recipe/matcher.lua " .. dir .. "/recipe/matcher.lua")
shell.execute(prefix .. "/src/recipe/Progress.lua " .. dir .. "/recipe/Progress.lua")
shell.execute(prefix .. "/src/recipe/recipes.lua " .. dir .. "/recipe/recipes.lua")
shell.execute(prefix .. "/src/recipe/transport.lua " .. dir .. "/recipe/transport.lua")
shell.execute(prefix .. "/src/util/db.lua " .. dir .. "/util/db.lua")
shell.execute(prefix .. "/src/util/item_utils.lua " .. dir .. "/util/item_utils.lua")
shell.execute(prefix .. "/src/util/readitem.lua " .. dir .. "/util/readitem.lua")
print("installed successfully! plz read https://github.com/shoaky009/assembly-line/blob/master/README.md, and edit conf/config.lua make it work")