mirror of
https://github.com/JanJastrow/.dotfiles.git
synced 2024-11-23 10:59:57 +01:00
update dl() details
This commit is contained in:
parent
ecf277ea23
commit
d2415d7b5b
@ -104,11 +104,11 @@ function extract () {
|
|||||||
# Download provided url to $HOME/Downloads
|
# Download provided url to $HOME/Downloads
|
||||||
function dl() {
|
function dl() {
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "usage: dl url (directory)"
|
echo "usage: dl url --- downloads to $HOME/Downloads"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [[ -x $(which aria2c) ]]; then
|
if [[ -x $(which aria2c) ]]; then
|
||||||
aria2c --dir="$HOME/Downloads" --continue=true --max-connection-per-server=5 "$1"
|
aria2c --dir="$HOME/Downloads" --continue=true --max-connection-per-server=4 "$1"
|
||||||
else
|
else
|
||||||
(cd "$HOME/Downloads" && curl -O "$1")
|
(cd "$HOME/Downloads" && curl -O "$1")
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user