X-Git-Url: http://git.rot13.org/?p=koha-eprints;a=blobdiff_plain;f=eprints-clone.sh;h=15f7ce0a507c1cefb8220f9e6f1d1a959126c952;hp=b50de24d0d32e5aa9187b0a7c448bc356249185c;hb=refs%2Fheads%2Fmaster;hpb=f1e7d02a7507e6d3ee7088343ba55a6bf9f11003 diff --git a/eprints-clone.sh b/eprints-clone.sh index b50de24..15f7ce0 100755 --- a/eprints-clone.sh +++ b/eprints-clone.sh @@ -5,13 +5,19 @@ to=bibliografija ep=/usr/share/eprints3 -bin="sudo -u eprints $ep/bin" +bin="time sudo -u eprints $ep/bin" dir=/tmp/eprints-clone test -d $dir || mkdir $dir -test -e $dir/$from.archive.xml || $bin/export $from archive XMLFiles > $dir/$from.archive.xml -#test -e $dir/$from.no-files.xml || $bin/export $from archive XML > $dir/$from.no-files.xml +# select just one export +if [ ! -e $dir/$from.archive.xml ] ; then + # wd don't want files embedded in XML + #$bin/export $from archive XMLFiles > $dir/$from.archive.xml + $bin/export $from archive XML > $dir/$from.archive.xml +) +test -e $dir/$from.archive.xml || + test -e $dir/$from.subject.xml || $bin/export $from subject XML > $dir/$from.subject.xml test -e $dir/$from.user.xml || $bin/export $from user XML > $dir/$from.user.xml @@ -37,16 +43,21 @@ else git diff cfg.d/database.pl | patch -R -p1 + git commit -m "$from configuration changes" -a + echo "Modify databse for $from shema" $bin/epadmin update $to #$bin/epadmin erase_data $to - $bin/import --verbose $to user XML $dir/$from.user.xml - $bin/import_subjects --verbose --xml $to $dir/$from.subject.xml - $bin/import --verbose $to eprint XML $dir/$from.archive.xml + echo "Importing data to $to" + $bin/import $to user XML $dir/$from.user.xml + $bin/import_subjects --xml $to $dir/$from.subject.xml + $bin/import --enable-web-imports $to eprint XML $dir/$from.archive.xml + $bin/generate_static $to + $bin/generate_views $to + $bin/generate_abstracts $to fi -