mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Add suport for aria2c for faster downloading if installed (#299)
* Add suport for aria2c for faster downloading if installed * Fix newlines in aria2c output
This commit is contained in:
parent
bb6b4fe597
commit
4c85cf5596
1 changed files with 12 additions and 3 deletions
15
quickget
15
quickget
|
@ -552,9 +552,18 @@ function web_get() {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then
|
||||
echo "ERROR! Failed to download ${URL}. Try running 'quickget' again."
|
||||
exit 1
|
||||
if command -v aria2c > /dev/null; then
|
||||
if ! aria2c -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" -o "${DIR}/${FILE}"; then
|
||||
echo #Necessary as aria2c in suppressed mode doesnot have new lines
|
||||
echo "ERROR! Failed to download ${URL}. Try running 'quickget' again."
|
||||
exit 1
|
||||
fi
|
||||
echo #Necessary as aria2c in suppressed mode doesnot have new lines
|
||||
else
|
||||
if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then
|
||||
echo "ERROR! Failed to download ${URL}. Try running 'quickget' again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue