forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathctrm
More file actions
31 lines (26 loc) · 748 Bytes
/
ctrm
File metadata and controls
31 lines (26 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/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" ;
}
}