changeset 156:d3b002fd944e

fix: my attempt at speeding up things failed. reverting back to trusty grep -vf
author edhoprima
date Sat, 25 Apr 2009 16:16:50 +0000
parents 78ef726d3845
children ffca564daefa
files moefetch.sh
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/moefetch.sh	Sat Apr 25 16:11:06 2009 +0000
+++ b/moefetch.sh	Sat Apr 25 16:16:50 2009 +0000
@@ -81,18 +81,18 @@
 		echo "Generating list of new files..."
 		# THE FILES
 		#ls "../$outdir" | grep -vf "$outdir-error" > "$outdir-ok"
-		#cat "$outdir-list" | grep -vf "$outdir-ok" > "$outdir-newlist"
+		#
 		ls "../$outdir" | comm -1 -2 "$outdir-error" - > "$outdir-ok"
-		comm -1 -2 "$outdir-list" "$outdir-error" > "$outdir-newlist"
+		cat "$outdir-list" | grep -vf "$outdir-ok" > "$outdir-newlist"
 		echo "`echo \`wc -l < \"$outdir-newlist\"\`` file(s) to be downloaded"
 		cd "../$outdir"
 
 		echo "Removing error files"
 		if [ $totalerr -eq 0 ]; then
 			echo "No error file. 0 file removed"
-		elif [ $totalerr -gt 0 ]; then
+		else
 			cat "../temp/$outdir-error" | xargs rm
-		echo "$totalerr file(s) removed"
+			echo "$totalerr file(s) removed"
 		fi
 		echo "`echo \`ls | wc -l\`` file(s) available locally"
 		cd ../temp