Commit 0259373393a9394c8981fc5f22e17cdfdb852e08

Authored by Paulo Graça
1 parent 95208bc27a
Exists in master

PG: add exec path

Showing 2 changed files with 11 additions and 7 deletions   Show diff stats
ingester/prepare.sh
1 1 #!/bin/bash
2 2  
3 3 # find all PDF files
4   -# find . -type f -name '*.pdf' -exec ./prepare.sh {} \;
  4 +# time find . -type f -name '*.pdf' -exec ./prepare.sh {} \;
5 5  
6 6 while [[ $# > 1 ]]
7 7 do
... ... @@ -26,6 +26,9 @@ filename=$(basename $file)
26 26 # Current script dir
27 27 pushd `dirname $0` > /dev/null
28 28 SCRIPTPATH=`pwd`
  29 +if [ -d $SCRIPTPATH.'/ingester' ]; then
  30 + SCRIPTPATH=$SCRIPTPATH.'/ingester/'
  31 +fi
29 32 popd > /dev/null
30 33  
31 34 mylogger "start extracting DOI from PDF - $file"
... ...
ingester/setup.sh
... ... @@ -26,7 +26,7 @@ fi
26 26  
27 27 echo "install poppler-utils (pdftotext)"
28 28 if [ "$OS" == "Redhat" ]; then
29   - yum install poppler-utils
  29 + yum install poppler-utils libxml2 libxslt
30 30 elif [ "$OS" == "Debian" ]; then
31 31 sudo apt-get install poppler-utils
32 32 else
... ... @@ -39,10 +39,11 @@ wget -O - http://cpanmin.us | perl - --self-upgrade
39 39  
40 40  
41 41 echo "install required libs"
42   -cpanm Data::Dumper
43   -cpanm XML::LibXML
44   -cpanm XML::LibXSLT
45   -cpanm File::Spec
46   -cpanm JSON::Parse
  42 +cpan YAML
  43 +cpan Data::Dumper
  44 +cpan XML::LibXML
  45 +cpan XML::LibXSLT
  46 +cpan File::Spec
  47 +cpan JSON::Parse
47 48  
48 49 echo "instalation complete"
... ...