]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - Plugson/pack.sh
Fix arch iso boot issue (#2825 #2824)
[Ventoy.git] / Plugson / pack.sh
1 #!/bin/sh
2
3 if [ -n "$PKG_DATE" ]; then
4 plugson_verion=$PKG_DATE
5 else
6 plugson_verion=$(date '+%Y%m%d %H:%M:%S')
7 fi
8
9 sed "s#.*plugson_build_date.*# <b id=\"plugson_build_date\">$plugson_verion</b>#" -i ./www/index.html
10
11 if [ ! -f ./vs/VentoyPlugson/Release/VentoyPlugson.exe ]; then
12 echo "NO VentoyPlugson.exe found"
13 exit 1
14 fi
15
16 if [ ! -f ./vs/VentoyPlugson/x64/Release/VentoyPlugson_X64.exe ]; then
17 echo "NO VentoyPlugson_X64.exe found"
18 exit 1
19 fi
20
21 if [ -f ./www.tar.xz ]; then
22 rm -f ./www.tar.xz
23 fi
24
25 VV=$(grep -m1 '\?v=' ./www/index.html | sed 's/.*v=\([0-9][0-9]*\).*/\1/g')
26 let VV++
27 echo V=$VV
28 sed "s/\?v=[0-9][0-9]*/?v=$VV/g" -i ./www/index.html
29
30
31 [ -f ./www/helplist ] && rm -f ./www/helplist
32 ls -1 ../INSTALL/grub/help/ | while read line; do
33 echo -n ${line:0:5} >> ./www/helplist
34 done
35 [ -f ./www/menulist ] && rm -f ./www/menulist
36 ls -1 ../INSTALL/grub/menu/ | while read line; do
37 echo -n ${line:0:5} >> ./www/menulist
38 done
39 echo -n "$plugson_verion" > ./www/buildtime
40
41 tar cf www.tar www
42 xz --check=crc32 www.tar
43
44 rm -f ../INSTALL/VentoyPlugson.exe
45 cp -a ./vs/VentoyPlugson/Release/VentoyPlugson.exe ../INSTALL/VentoyPlugson.exe
46
47 rm -f ../INSTALL/VentoyPlugson_X64.exe
48 cp -a ./vs/VentoyPlugson/x64/Release/VentoyPlugson_X64.exe ../INSTALL/VentoyPlugson_X64.exe
49
50
51 rm -f ../INSTALL/tool/plugson.tar.xz
52 mv ./www.tar.xz ../INSTALL/tool/plugson.tar.xz
53
54 echo ""
55 echo "========= SUCCESS ==========="
56 echo ""
57
58