Differences
This shows you the differences between two versions of the page.
Next revision
|
Previous revision
Next revision
Both sides next revision
|
ingesting:ingbscript [2012/11/27 09:40] giancarlo created |
ingesting:ingbscript [2012/11/27 10:17] giancarlo |
====== Book ingesting script update ====== | ====== Book ingesting script update ====== |
| |
| |
| * Multiple book ingesting script |
| |
| <WRAP prewrap center> |
| <code bash ingpiubook.sh> |
| #!/bin/bash |
| |
| FEDORA_HOME="/usr/local/fedora" |
| export FEDORA_HOME |
| |
| PATH=$PATH:$FEDORA_HOME/server/bin:$FEDORA_HOME/client/bin:$JAVA_HOME/bin:/bin:/usr/bin:/sbin:/usr/sbin |
| export PATH |
| |
| #Parameters |
| |
| #1 directory of book directories |
| #e.g. IMPORT_BASE_DIR="/srv/storage/scansioni/cognetti_collezioni/direttori/" |
| IMPORT_BASE_DIR=$1 |
| |
| #2 Collection PID |
| #e.g. IMPORT_COLLECTION="openbess:cognetti-C001" |
| IMPORT_COLLECTION=$2 |
| |
| #3 fedoraAdmin password or test |
| |
| #4 number of pages to ingest or 0 for all |
| |
| n=0 |
| for ndir in $(find "$IMPORT_BASE_DIR"* -maxdepth 0 -type d); |
| do |
| if [[ "$3" != test ]] |
| then |
| sleep 60 |
| else |
| echo "NO wait" |
| fi |
| echo "=====> $nomedir" |
| ./ingbookepages.sh "$ndir" $2 $3 $4 |
| done |
| </code> |
| </WRAP> |