This is an old revision of the document!
Book ingesting script update
- 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