blob: 0b4cd05db2d82b17b01296fa9734471693db1e33 (
plain)
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
|
#!/usr/bin/perl
# usage: 19commit 'log message' filename filename ...
use Cwd;
use String::ShellQuote;
my $USER = $ENV{USER};
my $dir = getcwd;
( my $prefix = $dir ) =~ s(^/home/$USER/freeside/?)() or die $dir; #eventually from anywhere
my $desc = shell_quote(shift @ARGV); # -m
die "no files!" unless @ARGV;
#warn "$prefix";
#print <<END;
system join('',
"( cd /home/$USER/freeside1.9/$prefix; cvs update @ARGV ) && ",
"cvs diff -u @ARGV | ( cd /home/$USER/freeside1.9/$prefix; patch -p0 ) ",
" && ( ( cvs commit -m $desc @ARGV & ); ",
"( sleep 1;cd /home/$USER/freeside1.9/$prefix; cvs commit -m $desc @ARGV & ) )"
);
|