- Timestamp:
- Oct 8, 2008, 3:45:21 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dasscm/dasscm
r228 r233 81 81 } 82 82 83 sub warning(@) 84 { 85 print "Warning: " . join( "\n ", @_ ) . "\n"; 86 } 87 88 sub error(@) 89 { 90 print "Error: " . join( "\n ", @_ ) . "\n"; 91 } 92 93 sub fatalerror(@) 94 { 95 error( @_ ); 96 #print "Exiting\n"; 97 exit 1 98 } 99 83 100 sub check_env() 84 101 { … … 156 173 sub check_parameter(@) 157 174 { 175 if( not @_ ) { 176 fatalerror( "no files specified. See 'dasscm --help'" ); 177 } 158 178 } 159 179 … … 165 185 } 166 186 167 -r $filename_prod or die "$filename_prod is not accessable"; 187 if( not -r $filename_prod ) { 188 fatalerror( $filename_prod . " is not accessable" ); 189 } elsif( -l $filename_prod ) { 190 my $dest = readlink($filename_prod); 191 # TODO: 192 # default: disallow, but offer cmd switch to activate 193 # (or check, if file is already checked in and has been a link before) 194 warning( "'$filename_prod' is a link to '$dest'.", "Please check, if '$dest' should be stored in repository instead" ); 195 if( ! -f $dest ) { 196 fatalerror( "link target '$dest' is not a regular file. Giving up" ); 197 } 198 } elsif( ! -f $filename_prod ) { 199 fatalerror( $filename_prod . " is not a regular file. Only regular files can be checked in." ); 200 } 168 201 169 202 # TODO: dirname buggy: eg. "/etc/" is reduced to "/", … … 480 513 svn_update(); 481 514 482 # add file 483 add_helper( $_[0] ); 515 # TODO: check all files 516 517 for my $file (@_) { 518 # add file 519 add_helper( $file ); 520 } 484 521 485 522 # create new permissions file
Note:
See TracChangeset
for help on using the changeset viewer.