Last active
August 29, 2015 14:11
-
-
Save jadedgnome/8a06c35680e77bbc33ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $1 == "" ]]; then | |
echo "Usage: $0 <downloadurl>"; exit | |
fi | |
aria2c -v 2>&1 >/dev/null || (echo "aria2 is not installed"; exit) | |
url=`echo $1 | cut -f1 -d"?"` | |
cmd="aria2c" | |
for mirror in `echo "kent freefr garr switch netcologne surfnet heanet iweb superb-dca3 superb-dca2 jaist tenet ufpt internode" | tr ' ' '\n'` ; do | |
cmd="${cmd} \"${url}?use_mirror=${mirror}\"" | |
done | |
eval $cmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment