-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbundle
executable file
·56 lines (41 loc) · 1.38 KB
/
bundle
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
#!/bin/sh
echo -n "release codename: "
read codename
echo -n "root query: "
read root
echo "generating autogen files"
echo "//AUTOGENERATED\n// DO NOT EDIT\nconfig.injectedQuery = '?$root';" > fs/c/windows/ime/gen/iquery.js
echo -n ?$root > fs/c/windows/ime/gen/iquery.prop
echo "//AUTOGENERATED\n// DO NOT EDIT\nconfig.rc = '$release';" > fs/c/windows/ime/gen/rc.js
echo -n $release > fs/c/windows/ime/gen/rc.prop
echo "//AUTOGENERATED\n// DO NOT EDIT\nconfig.beta = false;" > fs/c/windows/ime/gen/beta.js
echo -n false > fs/c/windows/ime/gen/beta.prop
echo "//AUTOGENERATED\n// DO NOT EDIT\nconfig.buildTime = new Date(`date +'%s'`000);" > fs/c/windows/ime/gen/buildTime.js
echo -n `date +'%s'`000 > fs/c/windows/ime/gen/buildTime.prop
echo "//AUTOGENERATED\n// DO NOT EDIT\nconfig.fs.providers.find(p => p.type == 'rrsp').ray = 'fs/ray';" > fs/c/windows/ime/gen/rrsp.js
echo "rendering index"
php index.php > index.html
echo
echo "rendering ray"
cd fs
php ray.php > ray
cd ..
echo "copying files"
mkdir ../win-bundles/$codename
mkdir ../win-bundles/$codename/boot
cp -r . ../win-bundles/$codename/boot
./reset
cd ../win-bundles/$codename/boot
echo "removing php"
rm fs/ray.php
rm index.php
rm bundle
rm reset
rm deploy
rm test
rm tests -r
rm changes
echo "compressing files"
zip -r ../$codename.zip . > /dev/null
echo "creating index"
echo "<script>location.href='boot/'</script>" > ../index.html