| 12345678910111213141516171819202122232425262728293031 |
- #!/usr/bin/perl
- if ( $#ARGV < 0 ) {
- exit print "Usage: ctrmelem element-name [...]\n" ;
- }
- $tool = $ENV{"DTOOL"} ;
- if ( $tool eq "" ) {
- die "Environment not configured for CTtools" ;
- }
- require "$tool/built/include/ctutils.pl" ;
- require "$tool/built/include/ctvspec.pl" ;
- require "$tool/built/include/ctquery.pl" ;
- require "$tool/built/include/ctproj.pl" ;
- require "$tool/built/include/ctcm.pl" ;
- $projname = &CTProj ;
- $projname =~ tr/A-Z/a-z/ ;
- $flav = &CTQueryProj( $projname ) ;
- $spec = &CTResolveSpec( $projname, $flav ) ;
- foreach $item ( @ARGV ) {
- if ( -e $item ) {
- if ( ! &CTCMRmElem( $item, $projname, $spec ) ) {
- print STDERR "Could not rmname '$item'\n" ;
- }
- } else {
- print STDERR "No such file '$item'.\n" ;
- }
- }
|