aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/scripts/download.sh
blob: d87335f3447a555a1a0acfaff9a565b6e5d5bc62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
# just an example of how you could handle your downloads
# try some pattern matching on the uri to determine what we should do

# Some sites block the default wget --user-agent...
WGET="wget --user-agent=Firefox"

if [[ $8 =~ .*(.torrent) ]] 
then
    cd $HOME
    $WGET $8
else
    cd $HOME
    $WGET $8
fi