(run) Download to a temporary file to avoid corruption from aborted downloads
This commit is contained in:
parent
62954f98de
commit
128f550ee5
@ -42,7 +42,7 @@ fi
|
||||
|
||||
mkdir -p node-1/samples/
|
||||
SAMPLE_TARBALL=samples/${SAMPLE_NAME}.tar.gz
|
||||
download_model ${SAMPLE_TARBALL} https://downloads.marginalia.nu/${SAMPLE_TARBALL}
|
||||
download_model ${SAMPLE_TARBALL}.tmp https://downloads.marginalia.nu/${SAMPLE_TARBALL} && mv ${SAMPLE_TARBALL}.tmp ${SAMPLE_TARBALL}
|
||||
|
||||
if [ ! -f ${SAMPLE_TARBALL} ]; then
|
||||
echo "!! Failed"
|
||||
|
@ -12,7 +12,8 @@ function download_model {
|
||||
|
||||
if [ ! -f $model ]; then
|
||||
echo "** Downloading $url"
|
||||
curl -s -o $model $url
|
||||
curl -s -o $model.tmp $url
|
||||
mv $model.tmp $model
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user