Changeset 2530 for trunk/gsdl/bin/script
- Timestamp:
- 2001-06-13T10:36:45+12:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/mkcol.pl
r2431 r2530 102 102 $destfile =~ s/^modelcol/$collection/; 103 103 $destfile =~ s/^MODELCOL/$capcollection/; 104 print STDOUT " doing replacements for $destfile\n" unless $quiet; 104 105 $destfile = &util::filename_cat ($coldir, $destfile); 105 106 print STDOUT "doing replacements for $thisfile\n" unless $quiet; 106 107 107 open (INFILE, $thisfile) || 108 die " Can't read file $thisfile";108 die "ERROR: Can't read file $thisfile"; 109 109 open (OUTFILE, ">$destfile") || 110 die " Can't create file $destfile";110 die "ERROR: Can't create file $destfile"; 111 111 112 112 while (defined ($line = <INFILE>)) { … … 173 173 ($collection) = @ARGV; 174 174 if (!defined($collection)) { 175 print STDOUT " no collection name was specified\n";175 print STDOUT "ERROR: no collection name was specified\n"; 176 176 &print_usage(); 177 177 die "\n"; … … 179 179 180 180 if (length($collection) > 8) { 181 print STDOUT " The collection name must be less than 8 characters\n";182 print STDOUT " so compatibility with earlier filesystems can be\n";183 print STDOUT " maintained.\n";181 print STDOUT "ERROR: The collection name must be less than 8 characters\n"; 182 print STDOUT " so compatibility with earlier filesystems can be\n"; 183 print STDOUT " maintained.\n"; 184 184 die "\n"; 185 185 } 186 186 187 187 if ($collection eq "modelcol") { 188 print STDOUT " No collection can be named modelcol as this is the\n";189 print STDOUT " name of the model collection.\n";188 print STDOUT "ERROR: No collection can be named modelcol as this is the\n"; 189 print STDOUT " name of the model collection.\n"; 190 190 die "\n"; 191 191 } 192 192 193 193 if ($collection eq "CVS") { 194 print STDOUT " No collection can be named CVS as this may interfere\n";195 print STDOUT " with directories created by the CVS versioning system\n";194 print STDOUT "ERROR: No collection can be named CVS as this may interfere\n"; 195 print STDOUT " with directories created by the CVS versioning system\n"; 196 196 die "\n"; 197 197 } 198 198 199 199 if (!defined($creator) || $creator eq "") { 200 print STDOUT " The creator was not defined. This variable is\n";201 print STDOUT " needed to recognise duplicate collection names.\n";200 print STDOUT "ERROR: The creator was not defined. This variable is\n"; 201 print STDOUT " needed to recognise duplicate collection names.\n"; 202 202 die "\n"; 203 203 } … … 236 236 237 237 # make sure the model collection exists 238 die " Cannot find the model collection $mdir" unless (-d $mdir);238 die "ERROR: Cannot find the model collection $mdir" unless (-d $mdir); 239 239 240 240 # make sure this collection does not already exist 241 241 if (-e $cdir) { 242 print STDOUT " This collection already exists\n";242 print STDOUT "ERROR: This collection already exists\n"; 243 243 die "\n"; 244 244 } 245 245 246 246 # start creating the collection 247 print STDOUT " Creating the collection $collection\n" unless $quiet;247 print STDOUT "\nCreating the collection $collection...\n" unless $quiet; 248 248 &traverse_dir ($mdir, $cdir); 249 print STDOUT "The new collection is in $cdir.\n" unless $quiet; 249 print STDOUT "\nThe new collection was created successfully at\n" unless $quiet; 250 print STDOUT "$cdir\n" unless $quiet; 250 251 } 251 252
Note:
See TracChangeset
for help on using the changeset viewer.