Skip to content

Instantly share code, notes, and snippets.

@jadedgnome
Last active August 29, 2015 14:11
Show Gist options
  • Save jadedgnome/8a06c35680e77bbc33ce to your computer and use it in GitHub Desktop.
Save jadedgnome/8a06c35680e77bbc33ce to your computer and use it in GitHub Desktop.
#!/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