3 if [ "$1" = "CI" ]; then
9 dos2unix
-q .
/tool
/ventoy_lib.sh
10 dos2unix
-q .
/tool
/VentoyWorker.sh
11 dos2unix
-q .
/tool
/WebDeepin.sh
12 dos2unix
-q .
/tool
/WebUos.sh
14 . .
/tool
/ventoy_lib.sh
16 GRUB_DIR
=..
/GRUB
2/INSTALL
19 if ! [ -d $GRUB_DIR ]; then
20 echo "$GRUB_DIR not exist"
35 sh language.sh
|| exit 1
43 dd if=/dev
/zero of
=img.bin bs
=1M count
=256 status
=none
45 losetup
-P $LOOP img.bin
47 while ! grep -q 524288 /sys
/block
/${LOOP#/dev/}/size
2>/dev
/null
; do
52 format_ventoy_disk_mbr
0 $LOOP fdisk
54 $GRUB_DIR/sbin
/grub
-bios-setup --skip-fs-probe --directory="./grub/i386-pc" $LOOP
56 curver
=$(get_ventoy_version_from_cfg ./grub/grub.cfg)
58 tmpmnt
=.
/ventoy
-${curver}-mnt
59 tmpdir
=.
/ventoy
-${curver}
64 mount
${LOOP}p2
$tmpmnt
68 # First copy grub.cfg file, to make it locate at front of the part2
69 cp $OPT .
/grub
/grub.cfg
$tmpmnt/grub
/
71 ls -1 .
/grub
/ | grep -v 'grub\.cfg' | while read line
; do
72 cp $OPT .
/grub
/$line $tmpmnt/grub
/
75 cp $OPT .
/ventoy
$tmpmnt/
76 cp $OPT .
/EFI
$tmpmnt/
77 cp $OPT .
/tool
/ENROLL_THIS_KEY_IN_MOKMANAGER.cer
$tmpmnt/
81 cp $OPT .
/tool
/i
386/mount.exfat
-fuse $tmpmnt/tool
/mount.exfat
-fuse_i386
82 cp $OPT .
/tool
/x
86_
64/mount.exfat
-fuse $tmpmnt/tool
/mount.exfat
-fuse_x86_64
83 cp $OPT .
/tool
/aarch
64/mount.exfat
-fuse $tmpmnt/tool
/mount.exfat
-fuse_aarch64
86 rm -f $tmpmnt/grub
/i386
-pc/*.img
89 umount
$tmpmnt && rm -rf $tmpmnt
94 mkdir -p $tmpdir/ventoy
95 echo $curver > $tmpdir/ventoy
/version
96 dd if=$LOOP of
=$tmpdir/boot
/boot.img bs
=1 count
=512 status
=none
97 dd if=$LOOP of
=$tmpdir/boot
/core.img bs
=512 count
=2047 skip
=1 status
=none
98 xz
--check=crc32
$tmpdir/boot
/core.img
100 cp $OPT .
/tool
$tmpdir/
101 rm -f $tmpdir/ENROLL_THIS_KEY_IN_MOKMANAGER.cer
102 cp $OPT Ventoy2Disk.sh
$tmpdir/
103 cp $OPT VentoyWeb.sh
$tmpdir/
104 cp $OPT VentoyWebDeepin.sh
$tmpdir/
105 #cp $OPT Ventoy.desktop $tmpdir/
106 cp $OPT README
$tmpdir/
107 cp $OPT plugin
$tmpdir/
108 cp $OPT CreatePersistentImg.sh
$tmpdir/
109 cp $OPT ExtendPersistentImg.sh
$tmpdir/
110 dos2unix
-q $tmpdir/Ventoy2Disk.sh
111 dos2unix
-q $tmpdir/VentoyWeb.sh
112 dos2unix
-q $tmpdir/VentoyWebDeepin.sh
113 #dos2unix -q $tmpdir/Ventoy.desktop
114 dos2unix
-q $tmpdir/CreatePersistentImg.sh
115 dos2unix
-q $tmpdir/ExtendPersistentImg.sh
117 cp $OPT ..
/LinuxGUI
/WebUI
$tmpdir/
118 sed 's/.*SCRIPT_DEL_THIS \(.*\)/\1/g' -i $tmpdir/WebUI
/index.html
121 dd status
=none
if=$LOOP of
=$tmpdir/ventoy
/ventoy.disk.img bs
=512 count
=$VENTOY_SECTOR_NUM skip
=$part2_start_sector
122 xz
--check=crc32
$tmpdir/ventoy
/ventoy.disk.img
124 losetup
-d $LOOP && rm -f img.bin
126 rm -f ventoy
-${curver}-linux.
tar.gz
131 for d
in i386 x86_64 aarch64
; do
133 for file in $(ls); do
134 if [ "$file" != "xzcat" ]; then
135 xz
--check=crc32
$file
142 find $tmpdir/ -type d
-exec chmod 755 "{}" +
143 find $tmpdir/ -type f
-exec chmod 644 "{}" +
144 chmod +x
$tmpdir/Ventoy2Disk.sh
145 chmod +x
$tmpdir/VentoyWeb.sh
146 chmod +x
$tmpdir/VentoyWebDeepin.sh
147 #chmod +x $tmpdir/Ventoy.desktop
148 chmod +x
$tmpdir/CreatePersistentImg.sh
149 chmod +x
$tmpdir/ExtendPersistentImg.sh
151 tar -czvf ventoy
-${curver}-linux.
tar.gz
$tmpdir
155 rm -f ventoy
-${curver}-windows.
zip
156 cp $OPT Ventoy2Disk
*.exe
$tmpdir/
157 cp $OPT $LANG_DIR/languages.json
$tmpdir/ventoy
/
164 zip -r ventoy
-${curver}-windows.
zip $tmpdir/
168 echo "=============== run livecd.sh ==============="
173 mv ..
/LiveCD
/ventoy
*.iso .
/
175 if [ -e ventoy
-${curver}-windows.
zip ] && [ -e ventoy
-${curver}-linux.
tar.gz
]; then
176 echo -e "\n ============= SUCCESS =================\n"
178 echo -e "\n ============= FAILED =================\n"