mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-31 12:14:27 +01:00
kata-deploy-binaries: Avoid pushd / popd if not needed
Let's avoid getting into a dir and risking not being able to leave that dir in case something fails. Instead, let's just stay in the current dir and move the final tarball to the exoected directory in case all the checks go as expected. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
@@ -126,12 +126,11 @@ install_cached_component() {
|
||||
[ "${cached_version}" != "${current_version}" ] && return 1
|
||||
|
||||
info "Using cached tarball of ${component}"
|
||||
pushd ${workdir}
|
||||
echo "Downloading tarball from: ${jenkins_build_url}/${component_tarball_name}"
|
||||
curl -fL --progress-bar "${jenkins_build_url}/${component_tarball_name}" -o "${component_tarball_path}" || return cleanup_and_fail
|
||||
curl -fL --progress-bar "${jenkins_build_url}/${component_tarball_name}" -o "${component_tarball_name}" || return cleanup_and_fail
|
||||
curl -fsOL "${jenkins_build_url}/sha256sum-${component_tarball_name}" || return cleanup_and_fail
|
||||
sha256sum -c "sha256sum-${component_tarball_name}" || return cleanup_and_fail
|
||||
popd
|
||||
mv "${component_tarball_name}" "${component_tarball_path}"
|
||||
}
|
||||
|
||||
# Install static CC cloud-hypervisor asset
|
||||
|
||||
Reference in New Issue
Block a user