Annotation of foxridge-archiver/archivemany.sh, revision 1.4
1.1 casties 1: #!/bin/bash
2:
1.3 casties 3: VERSION="archivemany V0.2 (23.9.2005 ROC)"
1.1 casties 4:
1.2 casties 5: #set -x
6:
1.1 casties 7: if [ -z "$1$2" ]
8: then
9: echo $VERSION
10: echo "use: $0 docdir dirlist"
11: echo " Archives the directories given in the file dirlist inside docdir."
12: exit 1
13: fi
14:
15: BASEDIR="$1"
16: DIRLIST="$2"
1.4 ! casties 17: PARAM1="$3"
! 18: PARAM2="$4"
! 19: PARAM3="$5"
1.3 casties 20: CNT="1"
1.1 casties 21:
22: if [ ! -d $BASEDIR ]
23: then
24: echo "ERROR: base directory $BASEDIR not found!"
25: exit 1
26: fi
27:
28: if [ ! -f $DIRLIST ]
29: then
30: echo "ERROR: directory list file $DIRLIST not found!"
31: exit 1
32: fi
33:
34: cat $DIRLIST | while read DIR
35: do
36: if [ -d "$BASEDIR/$DIR" ]
37: then
1.3 casties 38: echo "archiving document $CNT: $DIR..."
1.4 ! casties 39: if /usr/local/mpiwg/archive/archiver "$PARAM1" "$PARAM2" "$PARAM3" "$BASEDIR/$DIR"
1.1 casties 40: then
41: echo " done on `date`"
42: else
43: echo "FAILED!"
44: # abort?
45: fi
46: else
47: echo "ERROR: document directory $BASEDIR/$DIR not found!"
48: fi
1.3 casties 49: CNT=$(( $CNT + 1 ))
1.1 casties 50: done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>