aboutsummaryrefslogtreecommitdiffstats
path: root/runcheck
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2015-02-13 10:19:42 +0100
committerPetter Reinholdtsen <pere@hungry.com>2015-02-13 10:19:42 +0100
commita96eb89a7ad166a7c87dc9ea9dbbe044d3064d5d (patch)
tree79b2526ecb52f8e6eeb7d77fb4fb1e15f22fab14 /runcheck
parent7f038dc34aae77efac98f2ee700c8f81233441b6 (diff)
More info during data collection.
Diffstat (limited to 'runcheck')
-rwxr-xr-xruncheck23
1 files changed, 13 insertions, 10 deletions
diff --git a/runcheck b/runcheck
index f368b67..2763703 100755
--- a/runcheck
+++ b/runcheck
@@ -2,7 +2,7 @@
set -e
-file=testurls.txt
+file=urls-test.txt
if [ "$1" ] ; then
file="$1"
@@ -14,16 +14,19 @@ cat $file | while read url ; do
# Save with URL as filename, replacing / with % and dropping trailing slash.
filename=$(echo "$url" | sed 's%/$%%' |tr / %)
harfile="har-data/$filename.har"
- if [ -e "$harfile" ] ; then
- echo found $harfile, skipping
- continue
- fi
- echo "testing $url"
- if phantomjs netsniff.js "$url" > "$harfile.new" &&
- [ -s "$harfile.new" ]; then
- mv "$harfile.new" "$harfile"
+ if [ ! -e "$harfile" ] ; then
+ echo "testing $url"
+ if phantomjs netsniff.js "$url" > "$harfile.new" &&
+ [ -s "$harfile.new" ]; then
+ mv "$harfile.new" "$harfile"
+ else
+ rm "$harfile.new"
+ fi
else
- rm "$harfile.new"
+ echo found $harfile, not downloading
+ fi
+ if [ -e "$harfile" ] && grep -q google-analytics.com "$harfile" ; then
+ echo "NSA/FRA warning for $url"
fi
;;
esac