From 4d33b0541d3a4ffd7b0ef7fddfea3f848449fa1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 28 Jul 2022 21:29:33 +0200 Subject: [PATCH] packaging: Don't hardcode "edk2" as the cloned repo's dir. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As TDVF comes from a different repo, the edk2-staging one, we cannot simply hardcode the name. Instead, let's get the name of the directory from name of the git repo. Signed-off-by: Fabiano FidĂȘncio --- tools/packaging/static-build/ovmf/build-ovmf.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/packaging/static-build/ovmf/build-ovmf.sh b/tools/packaging/static-build/ovmf/build-ovmf.sh index 83537686c9..a257df3d43 100755 --- a/tools/packaging/static-build/ovmf/build-ovmf.sh +++ b/tools/packaging/static-build/ovmf/build-ovmf.sh @@ -1,6 +1,7 @@ #!/bin/bash # # Copyright (c) 2022 IBM +# Copyright (c) 2022 Intel # # SPDX-License-Identifier: Apache-2.0 @@ -15,7 +16,6 @@ source "${script_dir}/../../scripts/lib.sh" set +u ovmf_build="${ovmf_build:-x86_64}" ovmf_repo="${ovmf_repo:-}" -ovmf_dir="edk2" ovmf_version="${ovmf_version:-}" ovmf_package="${ovmf_package:-}" package_output_dir="${package_output_dir:-}" @@ -30,6 +30,8 @@ build_target="${build_target:-RELEASE}" [ -n "$ovmf_package" ] || die "failed to get ovmf package or commit" [ -n "$package_output_dir" ] || die "failed to get ovmf package or commit" +ovmf_dir="${ovmf_repo##*/}" + info "Build ${ovmf_repo} version: ${ovmf_version}" build_root=$(mktemp -d) @@ -65,4 +67,4 @@ popd info "Install fd to destdir" mkdir -p "$DESTDIR/$PREFIX/share/ovmf" -cp $build_root/$ovmf_dir/"${build_path}" "$DESTDIR/$PREFIX/share/ovmf" \ No newline at end of file +cp $build_root/$ovmf_dir/"${build_path}" "$DESTDIR/$PREFIX/share/ovmf"