]> gitweb.fluxo.info Git - cache.git/commitdiff
Pdflinks: fix file checking
authorCache do Fluxo <cache@fluxo.info>
Thu, 20 Apr 2017 03:15:47 +0000 (00:15 -0300)
committerCache do Fluxo <cache@fluxo.info>
Thu, 20 Apr 2017 03:15:47 +0000 (00:15 -0300)
bin/pdflinks

index ada36e8ede8c8bf45c49667244a76010dd4738c6..a72d9019aa72daf2a27b0314f424847732ae6805 100755 (executable)
@@ -9,7 +9,7 @@ find data -iname '*.pdf' | grep -v 'screenshot.pdf' | while read line; do
   third="`echo $line  | cut -d '/' -f 4`"
   url_base="$(basename "$line")"
 
-  if [ ! -h "$first/$second/$third/$url_base" ]; then
+  if [ ! -e "data/$first/$second/$third/$url_base" ]; then
     echo "Processing $first/$second/$third..."
     ( cd data/$first/$second/$third &> /dev/null && find -iname '*.pdf' -exec ln -s {} "$url_base" \;)
   fi