Do not build updater when using QEMU model

This commit is contained in:
Jeremy Soller
2019-09-20 14:21:49 -06:00
parent 42bad6730e
commit 2cb5fa405f

View File

@ -9,9 +9,9 @@ then
fi
MODEL="$1"
if [ ! -d "models/$1" ]
if [ ! -d "models/${MODEL}" ]
then
echo "model '$1' not found" >&2
echo "model '${MODEL}' not found" >&2
exit 1
fi
MODEL_DIR="$(realpath "models/${MODEL}")"
@ -62,6 +62,8 @@ FIRMWARE_OPEN_UEFIPAYLOAD="${UEFIPAYLOAD}" \
"${MODEL_DIR}/coreboot.config" \
"${COREBOOT}"
if [ "${MODEL}" != "qemu" ]
then
# Rebuild firmware-update
SHASUM="$(sha384sum "${COREBOOT}" | cut -d " " -f 1)"
export BASEDIR="system76-${SHASUM}"
@ -80,3 +82,4 @@ then
mcopy -i "${USB}.partial@@1M" "${MODEL_DIR}/uecflash.efi" "::${BASEDIR}/firmware/uecflash.efi"
fi
mv -v "${USB}.partial" "${USB}"
fi