# HG changeset patch # User casties # Date 1128519312 -7200 # Node ID 8b9d91963de783e445ecc1ce9fee506aae659746 # Parent 1dd183b95c61f37361a56e4216ede2c93329bce4 more option passing to metacheck from archivemany via archiver diff -r 1dd183b95c61 -r 8b9d91963de7 archivemany.sh --- a/archivemany.sh Tue Oct 04 16:36:32 2005 +0200 +++ b/archivemany.sh Wed Oct 05 15:35:12 2005 +0200 @@ -14,7 +14,9 @@ BASEDIR="$1" DIRLIST="$2" -PARAM="$3" +PARAM1="$3" +PARAM2="$4" +PARAM3="$5" CNT="1" if [ ! -d $BASEDIR ] @@ -34,7 +36,7 @@ if [ -d "$BASEDIR/$DIR" ] then echo "archiving document $CNT: $DIR..." - if /usr/local/mpiwg/archive/archiver "$PARAM" "$BASEDIR/$DIR" + if /usr/local/mpiwg/archive/archiver "$PARAM1" "$PARAM2" "$PARAM3" "$BASEDIR/$DIR" then echo " done on `date`" else diff -r 1dd183b95c61 -r 8b9d91963de7 archiver.pl --- a/archiver.pl Tue Oct 04 16:36:32 2005 +0200 +++ b/archiver.pl Wed Oct 05 15:35:12 2005 +0200 @@ -16,7 +16,7 @@ # # program version -my $version = "0.7.1 (ROC 23.9.2005)"; +my $version = "0.7.2 (ROC 5.10.2005)"; # short help my $help = "MPIWG archiver $version @@ -25,6 +25,7 @@ -debug show debugging info -premigrate don't delete archived files -force archive even if already archived + -replace rewrite index file "; # read command line parameters @@ -40,6 +41,9 @@ # force archiving my $force_archive = (exists $$args{'force'}) ? $$args{'force'} : 0; +# rewrite index file +my $rewrite_index = (exists $$args{'replace'}) ? $$args{'replace'} : 0; + # rewrite XML file (necessary for archive date!) my $fix_xml = 1; my $xml_changed = 0; @@ -372,7 +376,11 @@ } # use metacheck first -if (open CHECK, "$checkprog -add-files $docdir |") { +my $check_opts="-add-files"; +if ($rewrite_index) { + $check_opts = "-replace"; +} +if (open CHECK, "$checkprog $check_opts $docdir |") { my @errors; my $msg; while () {