forgot one
authorChris Sharp <csharp@georgialibraries.org>
Fri, 4 Nov 2011 16:58:54 +0000 (12:58 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Mon, 28 Nov 2011 19:38:17 +0000 (14:38 -0500)
Open-ILS/examples/pines-examples/utility-server/scripts/run-collections.sh [new file with mode: 0755]

diff --git a/Open-ILS/examples/pines-examples/utility-server/scripts/run-collections.sh b/Open-ILS/examples/pines-examples/utility-server/scripts/run-collections.sh
new file mode 100755 (executable)
index 0000000..a8497aa
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+DATE=$(date +%Y-%m-%d);
+DIR="collections-$DATE"
+LIBS="ARL ECGR NCLS HALL OHOOP HCLS LEE RML SJRLS TLLS DCPL STRL ROCK HOU CRLS SHRL TCPLS TRRL CPRL WORTH PMRLS CLAYTN"
+USRNAME="myusername"
+PASSWD="mypass"
+REMOTE_HOST="sftp.example.com:files/"
+
+cd ums;
+mkdir $DIR
+
+for lib in $LIBS; do
+    ./run-calls.pl /openils/conf/opensrf_core.xml $USRNAME $PASSWD $lib
+    mv data-$lib $DIR/
+done;
+
+tar cvf $DIR.tar $DIR
+gzip $DIR.tar
+
+echo "scping $DIR.tar.gz...";
+scp $DIR.tar.gz $REMOTE_HOST
+