From 0fb83cfa2c34e0f46a72fbc9f18c4b06205e82d2 Mon Sep 17 00:00:00 2001 From: dpavlin Date: Tue, 29 Oct 2013 22:40:00 +0100 Subject: [PATCH] use web imports to transfer files --- eprints-clone.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/eprints-clone.sh b/eprints-clone.sh index 524fc44..15f7ce0 100755 --- a/eprints-clone.sh +++ b/eprints-clone.sh @@ -10,8 +10,14 @@ 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 @@ -45,11 +51,13 @@ else #$bin/epadmin erase_data $to echo "Importing data to $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 + $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 - -- 2.20.1