b87fcf32a186a8a94d9a2db56e08ec309748f53e
[koha-eprints] / eprints-clone.sh
1 #!/bin/sh -xe
2
3 from=ffzg
4 to=bibliografija
5
6 bin="sudo -u eprints /usr/share/eprints3/bin"
7
8 dir=/tmp/eprints-clone
9 test -d $dir || mkdir $dir
10
11 test -e $dir/$from.archive.xml || $bin/export $from archive XMLFiles > $dir/$from.archive.xml
12 test -e $dir/$from.subject.xml || $bin/export $from subject XML      > $dir/$from.subject.xml
13 test -e $dir/$from.user.xml    || $bin/export $from user    XML      > $dir/$from.user.xml
14
15 #$bin/epadmin              erase_data $to
16 #$bin/import          --verbose       $to user   XML $dir/$from.user.xml
17 #$bin/import_subjects --verbose --xml $to            $dir/$from.subject.xml
18 $bin/import          --verbose       $to eprint XML $dir/$from.archive.xml