Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #886 from jcvenegas/ci-install-asset-tmp-dir
Browse files Browse the repository at this point in the history
ci: install assets use tmpdir
  • Loading branch information
chavafg authored Feb 2, 2018
2 parents 787e1b9 + 8a52a94 commit 402b386
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .ci/install_asset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ repo_owner="clearcontainers"
latest=false
readonly runtime_versions_url="https://raw.githubusercontent.com/${repo_owner}/runtime/master/versions.txt"
readonly versions_txt="$GOPATH/src/github.com/${repo_owner}/runtime/versions.txt"
readonly tmp_dir=$(mktemp -t -d install-assets.XXXX)
#fake repository dir to query kernel and image version from remote
fake_repo_dir=$(mktemp -t -d assets.XXXX)

function cleanup {
rm -rf "${tmp_dir}"
}

trap cleanup EXIT

function usage() {
cat << EOT
Usage: $0 <kernel|image> <version>
Expand Down Expand Up @@ -191,5 +198,6 @@ function download_asset {
popd
}


pushd ${tmp_dir}
download_asset "$asset" "${version}"
popd

0 comments on commit 402b386

Please sign in to comment.