Skip to content

Commit

Permalink
Update build-ext.sh
Browse files Browse the repository at this point in the history
判断 bios 和 efi 版本并只编译相应的扩展
bios 版本强制指定 gcc 版本为  4.8
  • Loading branch information
chenall authored Nov 19, 2021
1 parent f77d034 commit ade782f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions build-ext.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
set -e
git clone --depth=1 https://github.com/chenall/grubutils.git $GITHUB_WORKSPACE/grubutils
pushd $GITHUB_WORKSPACE/grubutils
make -C umbr
make -j -C g4dext && mv g4dext/bin g4dext/ext
make -j -C g4eext && mv g4eext/bin g4eext/ext
GRUB4DOS_VER=$(cat $GITHUB_WORKSPACE/grub4dos_version)
if [ "${GRUB4DOS_VER/EFI}" = "${GRUB4DOS_VER}" ]; then
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 100
make -C umbr
make -j -C g4dext && mv g4dext/bin g4dext/ext
make -C g4dext clean
else
make -j -C g4eext && mv g4eext/bin g4eext/ext
make -C g4eext clean
fi
popd

0 comments on commit ade782f

Please sign in to comment.