diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-05-02 10:46:11 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-05-02 10:46:13 +0200 |
commit | e5f2de355110c662566e46bdb6bc380022016f9d (patch) | |
tree | fad98384e44ebfdc46103a4cab54741f23f82f01 | |
parent | 2ad8722791d1931ec11ad9426453b6059d33b250 (diff) | |
download | ptxdist-e5f2de355110c662566e46bdb6bc380022016f9d.tar.gz ptxdist-e5f2de355110c662566e46bdb6bc380022016f9d.tar.xz |
ptxd_make_get_http: only create the temp file when it is used
Otherwise, the empty file remains if the urlcheck succeeds.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_make_get.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh index 3d1769b26..a366ef900 100644 --- a/scripts/lib/ptxd_make_get.sh +++ b/scripts/lib/ptxd_make_get.sh @@ -61,9 +61,9 @@ ptxd_make_get_http() { # remove any pending or half downloaded files rm -f -- "${path}."* - temp_file="$(mktemp "${path}.XXXXXXXXXX")" || ptxd_bailout "failed to create tempfile" ptxd_make_serialize_take if [ "${ptxd_make_get_dryrun}" != "y" ]; then + temp_file="$(mktemp "${path}.XXXXXXXXXX")" || ptxd_bailout "failed to create tempfile" wget \ --passive-ftp \ --progress=bar:force \ |