version 1.1, 2005/06/20 15:21:30
|
version 1.4, 2005/10/05 13:35:12
|
Line 1
|
Line 1
|
#!/bin/bash |
#!/bin/bash |
|
|
VERSION="archivemany V0.1 (14.6.2005 ROC)" |
VERSION="archivemany V0.2 (23.9.2005 ROC)" |
|
|
|
#set -x |
|
|
if [ -z "$1$2" ] |
if [ -z "$1$2" ] |
then |
then |
Line 12 fi
|
Line 14 fi
|
|
|
BASEDIR="$1" |
BASEDIR="$1" |
DIRLIST="$2" |
DIRLIST="$2" |
|
PARAM1="$3" |
|
PARAM2="$4" |
|
PARAM3="$5" |
|
CNT="1" |
|
|
if [ ! -d $BASEDIR ] |
if [ ! -d $BASEDIR ] |
then |
then |
Line 29 cat $DIRLIST | while read DIR
|
Line 35 cat $DIRLIST | while read DIR
|
do |
do |
if [ -d "$BASEDIR/$DIR" ] |
if [ -d "$BASEDIR/$DIR" ] |
then |
then |
echo "archiving $DIR..." |
echo "archiving document $CNT: $DIR..." |
if /usr/local/mpiwg/archive/archiver "$BASEDIR/$DIR" |
if /usr/local/mpiwg/archive/archiver "$PARAM1" "$PARAM2" "$PARAM3" "$BASEDIR/$DIR" |
then |
then |
echo " done on `date`" |
echo " done on `date`" |
else |
else |
Line 40 do
|
Line 46 do
|
else |
else |
echo "ERROR: document directory $BASEDIR/$DIR not found!" |
echo "ERROR: document directory $BASEDIR/$DIR not found!" |
fi |
fi |
|
CNT=$(( $CNT + 1 )) |
done |
done |