--- /dev/null
+#!/bin/bash
+#
+# Ensure there are PDF links.
+#
+
+find data -iname '*.pdf' | grep -v 'screenshot.pdf' | while read line; do
+ first="`echo $line | cut -d '/' -f 2`"
+ second="`echo $line | cut -d '/' -f 3`"
+ third="`echo $line | cut -d '/' -f 4`"
+ url_base="$(basename "$line")"
+
+ if [ ! -e "$first/$second/$third/$url_base" ]; then
+ echo "Processing $first/$second/$third..."
+ ( cd data/$first/$second/$third && find -iname '*.pdf' -exec ln -s {} "$url_base" \;)
+ fi
+done