packaging: Don't hardcode "edk2" as the cloned repo's dir.

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 <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2022-07-28 21:29:33 +02:00
parent 7503bdab6e
commit 4d33b0541d

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# #
# Copyright (c) 2022 IBM # Copyright (c) 2022 IBM
# Copyright (c) 2022 Intel
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
@ -15,7 +16,6 @@ source "${script_dir}/../../scripts/lib.sh"
set +u set +u
ovmf_build="${ovmf_build:-x86_64}" ovmf_build="${ovmf_build:-x86_64}"
ovmf_repo="${ovmf_repo:-}" ovmf_repo="${ovmf_repo:-}"
ovmf_dir="edk2"
ovmf_version="${ovmf_version:-}" ovmf_version="${ovmf_version:-}"
ovmf_package="${ovmf_package:-}" ovmf_package="${ovmf_package:-}"
package_output_dir="${package_output_dir:-}" 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 "$ovmf_package" ] || die "failed to get ovmf package or commit"
[ -n "$package_output_dir" ] || 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}" info "Build ${ovmf_repo} version: ${ovmf_version}"
build_root=$(mktemp -d) build_root=$(mktemp -d)