forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathctdelta
More file actions
executable file
·57 lines (49 loc) · 1.35 KB
/
ctdelta
File metadata and controls
executable file
·57 lines (49 loc) · 1.35 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/perl
if ($#ARGV < 0) {
exit print "Usage: ctdelta element-name [...]\n" ;
}
$tool = $ENV{"DTOOL"} ;
if ( $tool eq "" ) {
die "not configured for using ct-tools\n" ;
}
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" ;
$comment = "" ;
$skip = 0 ;
@files = () ;
foreach $item ( @ARGV ) {
if ( $skip == 0 ) {
if ( $item eq "-nc" ) {
&CTUDebug( "-nc processed\n" ) ;
} elsif ( $item eq "-c" ) {
$skip = 1 ;
} else {
push( @files, $item ) ;
&CTUDebug( "added '" . $item . "' to files to be processed\n" ) ;
}
} elsif ( $skip == 1 ) {
$comment = $item ;
&CTUDebug( "setting comment to '" . $comment . "'\n" ) ;
$skip = 0 ;
} else {
&CTUDebug( "got to unknown skip value! (" . $skip . ")\n" ) ;
$skip = 0 ;
}
}
$projname = &CTProj ;
$projname =~ tr/A-Z/a-z/ ;
$flav = &CTQueryProj( $projname ) ;
$spec = &CTResolveSpec( $projname, $flav ) ;
foreach $item ( @files ) {
if ( -e $item ) {
&CTCMCheckin( $item, $projname, $spec ) ;
if ( ! &CTCMDelta( $item, $projname, $spec ) ) {
print STDERR "Could not delta '$item'\n" ;
}
} else {
print STDERR "No such file '$item'.\n" ;
}
}