-
Notifications
You must be signed in to change notification settings - Fork 0
/
GCLI.cu
62 lines (55 loc) · 2.08 KB
/
GCLI.cu
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
const[text.cli] = 'O-CLI: '
const[loop.boolean] = true
new[loop(while)] {
loop
}
loop(loop) {
if new[var(true)] do
var.par = __ALL_CASE__::true
new[var(cli.input)] = out[text.cli]
if var(cli.input) = 'help' do {
output[long{
"The following is a list of possible commands: "
"---------------------------------------------------------"
"1. help // Outlines list of possible commands"
"2. exit // Exits OPP CLI"
"3. iopp // Installs OPP Interpiler"
}]
}
if var(cli.input) = 'exit' do{
new[var(cli.exit.confirm)] = output['Confirm? (y/n) : ']
if var(cali.exit.confirm) = 'y' do{
break
}
else do{
goto.ln.13
}
}
if var(cli.input) = 'iopp' do{
output["Fetching git"]
import[git.package]
output["Success!"]
output["Fetching intercompiler from git repo"]
import[git.repo("https://github.com/Normolo/O-Plus-Plus").file("/O-Plus-Plus-Main.exe")] throw file["C:\Program Files\OPP"]
output["Success!"]
output["Fetching directory from git repo using i_m.json as manifest"]
import[git.repo("https://github.com/Normolo/O-Plus-Plus").directory("/installer")] parameters{
library.manifest = git.repo(ln.39).directory(ln.39).file("installer_manifest.json")
throw directory["C:\Program Files\OPP"]
}
output["Success!"]
new[var(user.dowloadTemplate)] = output["Installation completed. Would you like to download templates? (y/n) "]
if var(user.downloadTemplate) = 'y' do{
import[git.repo("https://github.com/Normolo/O-Plus-Plus/")].directory("/templates") parameters{
throw directory[do{
import[m.w.file_saving_window]
new[var(user.downloadTemplate)] = m.w.file_saving_window.loc
output["Templates have been downloaded"]
}]
}
}
else do{
goto.ln.13
}
}
}