Add script to use UEFIExtract
This avoids having to build UEFITool manually, which requires qt5.
This commit is contained in:
committed by
Jeremy Soller
parent
aeb83e33f6
commit
85a3921c1c
27
scripts/extract.sh
Executable file
27
scripts/extract.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
|
||||
TOOL_DIR="$SCRIPT_DIR/../tools"
|
||||
UEFIEXTRACT_DIR="$TOOL_DIR/UEFITool/UEFIExtract"
|
||||
|
||||
# Make sure UEFITool submodule is checked out
|
||||
if [ ! -d "$UEFIEXTRACT_DIR" ]
|
||||
then
|
||||
pushd "$TOOL_DIR" >/dev/null
|
||||
git submodule update --init UEFITool
|
||||
popd >/dev/null
|
||||
fi
|
||||
|
||||
# Make sure UEFIExtract is built
|
||||
if [ ! -f "$UEFIEXTRACT_DIR/UEFIExtract" ]
|
||||
then
|
||||
pushd "$UEFIEXTRACT_DIR" > /dev/null
|
||||
cmake -B . -G "Unix Makefiles" -DCMAKE_CXX_FLAGS="-Os" -DCMAKE_C_FLAGS="-Os"
|
||||
cmake --build .
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
"$UEFIEXTRACT_DIR/UEFIExtract" "$@"
|
Reference in New Issue
Block a user