Changeset 2138 for trunk/gsdl/bin/script/exportcol.pl
- Timestamp:
- 2001-03-08T15:45:10+13:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/exportcol.pl
r2075 r2138 62 62 $out = OUT; 63 63 $close_out = 1; 64 } 65 66 # make sure the collection is built (or at least contains all the 67 # directories we expect it to) - we expect that it should contain an 68 # index and an etc directory and will also copy across an images 69 # directory if it exists 70 my $colindexdir = &util::filename_cat ($ENV{'GSDLHOME'}, "collect", $collection, "index"); 71 my $colimagesdir = &util::filename_cat ($ENV{'GSDLHOME'}, "collect", $collection, "images"); 72 my $coletcdir = &util::filename_cat ($ENV{'GSDLHOME'}, "collect", $collection, "etc"); 73 if ((!-d $colindexdir) || (!-d $coletcdir)) { 74 print $out "exportcol.pl failed: One or more the the following necessary\n"; 75 print $out "directories does not exist\n\n"; 76 print $out " $colindexdir\n"; 77 print $out " $coletcdir\n"; 64 78 } 65 79 … … 143 157 144 158 # copy the collection itself 145 &util::cp_r (&util::filename_cat($ENV{'GSDLHOME'}, "collect", $collection), $collectdir); 159 my $thiscoldir = &util::filename_cat ($collectdir, $collection); 160 &util::mk_all_dir ($thiscoldir); 161 &util::cp_r ($colindexdir, $thiscoldir); 162 &util::cp_r ($coletcdir, $thiscoldir); 163 &util::cp_r ($colimagesdir, $thiscoldir) if (-e $colimagesdir); 146 164 147 165 print $out "exportcol.pl succeeded: The exported collection is in $topdir\n";
Note:
See TracChangeset
for help on using the changeset viewer.