X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=run.sh;h=11f68ce89fc4e86c45650b361a3661a24927051d;hb=32387ce163b962b7f03232cd499bae3f75efe165;hp=7ce7930cda676ea1d2300cb9b76ec11092e496e2;hpb=72ee461978b7f128f5a01ec6e41fd60dd8799fb7;p=webpac diff --git a/run.sh b/run.sh index 7ce7930..11f68ce 100755 --- a/run.sh +++ b/run.sh @@ -1,9 +1,23 @@ #!/bin/sh -#cd /data/isis_data/ebsco-marc -#wget -m -nH -i in +dir=`dirname $0` +if [ "$dir" == "." ] ; then + dir=`pwd` +fi -cd /data/webpac +week=`date +%Y%w` +last_week=`cat $dir/.week 2>/dev/null || echo 'none'` -./isis2xml.pl | swish-e -S prog -c swish_isis.conf +# do EBSCO update once a week +if [ "$week" != "$last_week" ] ; then + cd /data/isis_data/ebsco-marc +# wget -m -nH -i in + echo "$week" > $dir/.week +else + echo "EBSCO already updated this week..." +fi + +cd $dir + +( ./all2xml.pl | swish-e -S prog -c swish_isis.conf ) 2>&1 | tee log