forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathctmv
More file actions
35 lines (29 loc) · 786 Bytes
/
ctmv
File metadata and controls
35 lines (29 loc) · 786 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
32
33
34
35
#!/usr/bin/perl
if ( $#ARGV != 1 ) {
exit print "Usage: ctmv from-element to-element\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 ) ;
$from = $ARGV[0] ;
$to = $ARGV[1] ;
if ( -e $from ) {
if ( -e $to ) {
print STDERR "'$to' already exists.\n" ;
} else {
if ( ! &CTCMMv( $from, $to, $projname, $spec ) ) {
}
}
} else {
print STDERR "No such element '$from'.\n" ;
}