X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/c7bb6270cc93eee7eed4569887434e69cae078f4..f26a927b3e2acf16820d118d5fc13b5dacbd122a:/INSTALL/all_in_one.sh?ds=sidebyside diff --git a/INSTALL/all_in_one.sh b/INSTALL/all_in_one.sh index 6b8c862..d87f713 100644 --- a/INSTALL/all_in_one.sh +++ b/INSTALL/all_in_one.sh @@ -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'