File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 1- # /bin/bash
1+ #! /bin/bash
22# set -xv
33
44USER_AGENT=" Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"
@@ -13,8 +13,19 @@ TEST=""
1313
1414echo " " > $D_TMP
1515
16- for f in ` wget -c --user-agent=" $USER_AGENT " --header=" $ACCEPT " -qO- $D_URL_LIST | grep -Eio " $D_PATTERN " | sort | uniq | tail -n 4` ; do
17- echo $D_URL_DIR$f >> $D_TMP
16+ for f in $( wget -c --user-agent=" $USER_AGENT " --header=" $ACCEPT " \
17+ -qO- $D_URL_LIST | grep -Eio " $D_PATTERN " | sort | uniq | tail -n 4) ; do
18+ echo $D_URL_DIR$f >> $D_TMP
1819done
1920
20- wget -c --user-agent=" $USER_AGENT " --header=" $ACCEPT " --no-clobber --input-file=$D_TMP $TEST --progress=bar
21+ if ! type " aria2c" > /dev/null; then
22+ wget -c --user-agent=" $USER_AGENT " --header=" $ACCEPT " --no-clobber \
23+ --input-file=$D_TMP $TEST --show-progress --progress=bar
24+ else
25+ IFS='
26+ '
27+
28+ for f in $( cat $D_TMP ) ; do
29+ aria2c -c " $f "
30+ done
31+ fi
You can’t perform that action at this time.
0 commit comments