mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
fix apt-download bug
Signed-off-by: bigeagle <justin.w.xd@gmail.com>
This commit is contained in:
parent
2416f3f991
commit
f5c4aa263c
@ -8,7 +8,7 @@ function check-and-download() {
|
||||
remote_file=$1
|
||||
local_file=$2
|
||||
echo "downloading ${remote_file}"
|
||||
timeout -s INT 300 wget -q -N -O ${WGET_OPTIONS} ${local_file} ${remote_file} || {
|
||||
timeout -s INT 300 wget ${WGET_OPTIONS} -q -N -O ${local_file} ${remote_file} || {
|
||||
rm ${local_file}
|
||||
return 1
|
||||
}
|
||||
@ -137,7 +137,7 @@ function apt-download-binary() {
|
||||
fi
|
||||
while [ $downloaded != true ]; do
|
||||
echo "downloading ${pkg_url} to ${dest_filename}"
|
||||
if [[ -z ${APT_DRY_RUN} ]]; then
|
||||
if [[ -z ${APT_DRY_RUN:-} ]]; then
|
||||
wget -q -O ${dest_filename} ${pkg_url} && {
|
||||
echo "${pkg_checksum} ${dest_filename}" | ${checksum_cmd} -c - && downloaded=true # two space for md5sum/sha1sum/sha256sum check format
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user