pack.sh 1.43 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

if [ -n "$PKG_DATE" ]; then
    plugson_verion=$PKG_DATE
else
    plugson_verion=$(date '+%Y%m%d %H:%M:%S')
fi

sed "s#.*plugson_build_date.*#                <b id=\"plugson_build_date\">$plugson_verion</b>#" -i ./www/index.html

if [ ! -f ./vs/VentoyPlugson/Release/VentoyPlugson.exe ]; then
    echo "NO VentoyPlugson.exe found"
    exit 1
fi

16
17
18
19
20
if [ ! -f ./vs/VentoyPlugson/x64/Release/VentoyPlugson_X64.exe ]; then
    echo "NO VentoyPlugson_X64.exe found"
    exit 1
fi

21
22
23
24
if [ -f ./www.tar.xz ]; then
    rm -f ./www.tar.xz
fi

25
26
27
28
29
30
VV=$(grep -m1 '\?v=' ./www/index.html |   sed  's/.*v=\([0-9][0-9]*\).*/\1/g')
let VV++
echo V=$VV
sed "s/\?v=[0-9][0-9]*/?v=$VV/g" -i ./www/index.html 


31
32
33
34
[ -f ./www/helplist ] && rm -f ./www/helplist
ls -1 ../INSTALL/grub/help/ | while read line; do 
    echo -n ${line:0:5} >> ./www/helplist
done 
35
36
37
38
[ -f ./www/menulist ] && rm -f ./www/menulist
ls -1 ../INSTALL/grub/menu/ | while read line; do 
    echo -n ${line:0:5} >> ./www/menulist
done 
39
40
41
42
43
44
echo -n "$plugson_verion" > ./www/buildtime

tar cf www.tar www
xz --check=crc32 www.tar

rm -f ../INSTALL/VentoyPlugson.exe
longpanda's avatar
longpanda committed
45
cp -a ./vs/VentoyPlugson/Release/VentoyPlugson.exe ../INSTALL/VentoyPlugson.exe
46

47
48
49
50
rm -f ../INSTALL/VentoyPlugson_X64.exe
cp -a ./vs/VentoyPlugson/x64/Release/VentoyPlugson_X64.exe ../INSTALL/VentoyPlugson_X64.exe


51
52
53
54
55
56
57
58
rm -f ../INSTALL/tool/plugson.tar.xz
mv ./www.tar.xz ../INSTALL/tool/plugson.tar.xz

echo ""
echo "========= SUCCESS ==========="
echo ""