Update download_dependencies.sh to clean target directory before downloading

PiperOrigin-RevId: 299741062
Change-Id: I732305a06df1299105cd0b113c0ac1ad7f9f9eef
This commit is contained in:
Terry Heo 2020-03-08 18:49:44 -07:00 committed by TensorFlower Gardener
parent 085cdbfceb
commit 8cb47cc868

View File

@ -72,6 +72,7 @@ download_and_extract() {
local sha256="${3}"
echo "downloading ${url}" >&2
mkdir -p "${dir}"
rm -rf ${dir}/* # Delete existing files.
tempdir=$(mktemp -d)
filepath="${tempdir}/$(basename ${url})"
curl -Lo ${filepath} ${url}