-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmkpbl.js
92 lines (78 loc) · 1.84 KB
/
mkpbl.js
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
const fs = require("fs");
const { execSync } = require("child_process");
const VERSION = "1.5.0A";
console.log("mkpbl - configuring");
fullBuild = [
"index.js",
"colors.js",
"error_util.js",
"lang.js",
"LICENSE",
"README.md",
"ReferenceManual.pdf",
"RPL.png",
"ascii.txt",
"src/array.js",
"src/comparison.js",
"src/event.js",
"src/io.js",
"src/logic.js",
"src/math.js",
"src/misc.js",
"src/stack.js",
"src/tcp.js",
"lib/MathEx.rpl",
"lib/wavefile.write.rpl",
"lib/http.rpl",
"examples/run.sh",
"examples/README.md",
"examples/basic/fibonacci.rpl",
"examples/basic/helloworld.rpl",
"examples/math/prime-number.rpl",
"examples/tcp/server-image.base64",
"examples/tcp/server-image.png",
"examples/tcp/server-index.html",
"examples/tcp/server.rpl",
"examples/misc/donut.rpl",
"extension/languages/jp.rpl.js"
];
command = "";
for (var i = 0; i < fullBuild.length; i++) {
console.log("Configuring " + fullBuild[i]);
command += fullBuild[i] + " ";
}
filename = "rpl-" + VERSION + ".tar.xz";
console.log("Compressing to " + filename);
execSync("tar cvfj " + filename + " " + command);
minBuild = [
"index.js",
"colors.js",
"error_util.js",
"lang.js",
"LICENSE",
"ascii.txt",
"src/array.js",
"src/comparison.js",
"src/event.js",
"src/io.js",
"src/logic.js",
"src/math.js",
"src/misc.js",
"src/stack.js",
"src/tcp.js",
"lib/MathEx.rpl",
"lib/wavefile.write.rpl",
"lib/http.rpl",
"extension"
];
console.log("Done");
console.log("Configuing for light build");
command = "";
for (var i = 0; i < minBuild.length; i++) {
console.log("Configuring " + minBuild[i]);
command += minBuild[i] + " ";
}
filename = "rpl-light-" + VERSION + ".tar.xz";
console.log("Compressing to " + filename);
execSync("tar cvfj " + filename + " " + command);
console.log("Done! Builds written");