comparison moefetch.sh @ 157:ffca564daefa

fix: I suck at comm
author edhoprima
date Sat, 25 Apr 2009 16:26:00 +0000
parents d3b002fd944e
children cba73f6a96bb
comparison
equal deleted inserted replaced
156:d3b002fd944e 157:ffca564daefa
80 80
81 echo "Generating list of new files..." 81 echo "Generating list of new files..."
82 # THE FILES 82 # THE FILES
83 #ls "../$outdir" | grep -vf "$outdir-error" > "$outdir-ok" 83 #ls "../$outdir" | grep -vf "$outdir-error" > "$outdir-ok"
84 # 84 #
85 ls "../$outdir" | comm -1 -2 "$outdir-error" - > "$outdir-ok" 85 ls "../$outdir" | comm -1 -3 "$outdir-error" - > "$outdir-ok"
86 cat "$outdir-list" | grep -vf "$outdir-ok" > "$outdir-newlist" 86 cat "$outdir-list" | grep -vf "$outdir-ok" > "$outdir-newlist"
87 echo "`echo \`wc -l < \"$outdir-newlist\"\`` file(s) to be downloaded" 87 echo "`echo \`wc -l < \"$outdir-newlist\"\`` file(s) to be downloaded"
88 cd "../$outdir" 88 cd "../$outdir"
89 89
90 echo "Removing error files" 90 echo "Removing error files"
111 if [ `echo \`wc -l < "$outdir-newlist"\`` -eq 0 ]; then 111 if [ `echo \`wc -l < "$outdir-newlist"\`` -eq 0 ]; then
112 echo "No new file" 112 echo "No new file"
113 else 113 else
114 echo "Starting wget" 114 echo "Starting wget"
115 cd "../$outdir" 115 cd "../$outdir"
116 wget -bi -e continue=on "../temp/$outdir-newlist" -o "../temp/$outdir.log" 116 wget -e continue=on -bi "../temp/$outdir-newlist" -o "../temp/$outdir.log"
117 fi 117 fi
118 } 118 }
119 119
120 120
121 # path initialization 121 # path initialization