]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - INSTALL/all_in_one.sh
VentoyLiveCD x86_64
[Ventoy.git] / INSTALL / all_in_one.sh
index 6b8c86267f4c50d0bf6d5688418a574fdb1b2db0..d87f713c583c8d1207259a3dd9d7c3bdc6610876 100644 (file)
@@ -1,29 +1,32 @@
 #!/bin/sh
 
 VTOY_PATH=$PWD/..
+LOGCON=$2
 
-LOG=$VTOY_PATH/DOC/build.log
-
-[ -f $LOG ] && rm -f $LOG
+logci() {
+    if [ -n "$LOGCON" ]; then
+        echo $* > $LOGCON
+    fi
+}
 
 cd $VTOY_PATH/DOC
-echo "prepare_env ..."
-sh prepare_env.sh >> $LOG 2>&1
+logci "prepare_env ..."
+sh prepare_env.sh
 
 export PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin:/opt/aarch64--uclibc--stable-2020.08-1/bin
 
 
-echo "build grub2 ..."
+logci "build grub2 ..."
 cd $VTOY_PATH/GRUB2
-sh buildgrub.sh >> $LOG 2>&1 || exit 1
+sh buildgrub.sh || exit 1
 
-echo "build ipxe ..."
+logci "build ipxe ..."
 cd $VTOY_PATH/IPXE
-sh buildipxe.sh >> $LOG 2>&1 || exit 1
+sh buildipxe.sh || exit 1
 
-echo "build edk2 ..."
+logci "build edk2 ..."
 cd $VTOY_PATH/EDK2
-sh buildedk.sh >> $LOG 2>&1 || exit 1
+sh buildedk.sh || exit 1
 
 
 
@@ -75,7 +78,8 @@ if [ "$1" = "CI" ]; then
     sed "s/VENTOY_VERSION=.*/VENTOY_VERSION=\"$Ver\"/"  -i ./grub/grub.cfg
 fi
 
-echo "packing ventoy-$Ver ..."
-sh ventoy_pack.sh $1 >> $LOG 2>&1 || exit 1
+logci "packing ventoy-$Ver ..."
+sh ventoy_pack.sh $1 || exit 1
 
+logci "==== finish ===="
 echo -e '\n============== SUCCESS ==================\n'