mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
32 lines
748 B
Perl
32 lines
748 B
Perl
#!/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" ;
|
|
}
|
|
}
|