-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·51 lines (34 loc) · 1.53 KB
/
build.sh
File metadata and controls
executable file
·51 lines (34 loc) · 1.53 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
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
# Clean up and make build + out dir
# rm -rf build
# mkdir build
rm -rf out
mkdir out
# mkdir out/untethered
mkdir out/injectVersion
# NPM install for Node script
# cd modulesJson
# npm install
# cd ../build
# Clone repo
# git clone https://github.com/GooseMod/Modules clone
# Use Node script to generate JSON and copy over minified JS files
# node ../modulesJson/generate.mjs
# Copy _headers
# cd ..
cp CNAME out/CNAME
# Copy latest inject.js to out (for untethered)
wget --no-cache https://raw.githubusercontent.com/GooseMod/GooseMod/dist-prod/index.js -O out/inject.js
cat out/inject.js | grep "this.versionHash=\".*?\"" -P -o | cut -d "\"" -f 2 > out/injectVersion/hash.txt
cat out/inject.js | grep "this.version=\".*?\"" -P -o | cut -d "\"" -f 2 > out/injectVersion/version.txt
echo "{\"version\": \"$(cat out/injectVersion/version.txt)\", \"hash\": \"$(cat out/injectVersion/hash.txt)\"}" > out/injectVersion.json
# Copy PGP library
wget "https://unpkg.com/openpgp@5.0.0-5/dist/openpgp.min.js" -O out/pgp.js
# Copy latest changelog release into out generated via Node script
# cd changelog
# wget --no-cache https://raw.githubusercontent.com/GooseMod/GooseMod/master/CHANGELOG.md -O changelog.md
# node generate.mjs
# cd ..
# Copy latest untethered JS stuff to out (for untethered)
# wget --no-cache https://raw.githubusercontent.com/GooseMod/Untethered/master/src/untetheredInject.js -O out/untethered/untetheredInject.js
# wget https://raw.githubusercontent.com/GooseMod/Untethered/master/src/base.js -O out/untethered/base.js