Skip to content

Instantly share code, notes, and snippets.

@jadedgnome

jadedgnome/sfdl.sh

Last active Aug 29, 2015
Embed
What would you like to do?
#!/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
You can’t perform that action at this time.