Changeset 5846


Ignore:
Timestamp:
2003-11-14T15:00:16+13:00 (20 years ago)
Author:
kjdon
Message:

now the script makes the exported collection public

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/exportcol.pl

    r5837 r5846  
    193193    &util::cp_r ($colimagesdir, $thiscoldir) if (-e $colimagesdir);
    194194
     195    # now we need to check the collect.cfg file to make sure its public
     196    my $collectcfg = &util::filename_cat ($thiscoldir, "etc", "collect.cfg");
     197    open INFILE, "<$collectcfg";
     198    open OUTFILE, ">$collectcfg.tmp";
     199    while ($line = <INFILE>) {
     200    if ($line =~ /^\s*public\s+false/) {
     201        print OUTFILE "public\ttrue\n";
     202        last; # stop matching once we have found the line
     203    } else {
     204        print OUTFILE "$line";
     205    }
     206    }
     207    # continue with no checking
     208    while ($line = <INFILE>) {
     209    print OUTFILE "$line";
     210    }
     211    close INFILE;
     212    close OUTFILE;
     213    &util::mv("$collectcfg.tmp", $collectcfg);
     214
    195215    print $out "exportcol.pl succeeded: The exported collection is in $topdir\n";
    196216    close OUT if $close_out;
Note: See TracChangeset for help on using the changeset viewer.