mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-28 12:05:40 +00:00
pkglib: Fix the detection of the versions.txt
When we try to run the kata-deploy-binaries.sh script, we have a failure on the pkglib.sh script that we can not source the versions.txt. In order to avoid these kind of failures, we introduce to detect if this file exists and in case that it does not, we fail the script. Fixes #712 Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
@@ -6,7 +6,14 @@
|
||||
source_dir_pkg_lib=$(dirname "${BASH_SOURCE[0]}")
|
||||
source_dir_pkg_lib=$(realpath "${source_dir_pkg_lib}")
|
||||
source "${source_dir_pkg_lib}/../../scripts/lib.sh"
|
||||
source "${source_dir_pkg_lib}/../versions.txt"
|
||||
|
||||
# Verify that versions.txt exists
|
||||
version_file="${source_dir_pkg_lib}/../versions.txt"
|
||||
if [ -f "${version_file}" ]; then
|
||||
source "${version_file}"
|
||||
else
|
||||
die "${version_file} does not exist, you need to run first the gen_versions_txt.sh"
|
||||
fi
|
||||
|
||||
PACKAGING_DIR=/var/packaging
|
||||
LOG_DIR=${PACKAGING_DIR}/build_logs
|
||||
|
Reference in New Issue
Block a user