Mercurial > hg > index.fcgi > www > www-1
view myrss/myrss_update.sh @ 31:fa86ad0325ad
thule_fit_kits/fitkits_Thule.txt: update with what's on the server currently
author | paulo@localhost |
---|---|
date | Sun, 08 Jan 2012 17:57:08 -0800 |
parents | fce61e65e3ae |
children |
line source
1 #!/bin/sh
3 TIMESTAMP=$(date '+%FT%T%:z')
4 TIMEOUT=60
5 MAXPROCS=20
7 i=0
8 n=0
9 for URL in $(grep -v '^#' FEEDS)
10 do
11 FN=$((++i)).feedtmp
12 wget -q -T ${TIMEOUT} -U '' -O - ${URL} | xsltproc step1.xsl - | xsltproc step2.xsl - > ${FN} &
13 if (( $((++n)) > ${MAXPROCS} ))
14 then
15 wait
16 n=0
17 fi
18 done
20 wait
22 echo '<HTML>'
23 echo '<HEAD>'
24 echo "<TITLE>${TIMESTAMP}</TITLE>"
25 echo '<LINK REL="stylesheet" TYPE="text/css" HREF="index.css">'
26 echo '</HEAD>'
28 echo '<BODY>'
29 echo "<H1>${TIMESTAMP}</H1>"
31 for j in $(seq 1 ${i})
32 do
33 cat ${j}.feedtmp
34 done
36 echo '</BODY>'
37 echo '</HTML>'
39 rm *.feedtmp