summaryrefslogtreecommitdiff
path: root/bin/23commit
diff options
context:
space:
mode:
Diffstat (limited to 'bin/23commit')
-rwxr-xr-xbin/23commit26
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/23commit b/bin/23commit
new file mode 100755
index 000000000..e629a60e6
--- /dev/null
+++ b/bin/23commit
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+
+# usage: 23commit '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/freeside2.3/$prefix; cvs update @ARGV ) && ",
+ "cvs diff -u @ARGV | ( cd /home/$USER/freeside2.3/$prefix; patch -p0 ) ",
+ " && ( ( cvs commit -m $desc @ARGV & ); ",
+ "( sleep 1;cd /home/$USER/freeside2.3/$prefix; cvs commit -m $desc @ARGV & ) )"
+);
+