summaryrefslogtreecommitdiff
path: root/bin/21commit
diff options
context:
space:
mode:
authorivan <ivan>2010-11-05 21:31:40 +0000
committerivan <ivan>2010-11-05 21:31:40 +0000
commit148ac21ae4677eba0e53c333ead11e74e6c8030f (patch)
tree2fd6a7296ad884e52a275eb6656ef6ae93c78c7f /bin/21commit
parent9b2de4257b6a2877434008188e52b8ef71ff339d (diff)
adding 21 tools
Diffstat (limited to 'bin/21commit')
-rwxr-xr-xbin/21commit26
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/21commit b/bin/21commit
new file mode 100755
index 000000000..211c0ed18
--- /dev/null
+++ b/bin/21commit
@@ -0,0 +1,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/freeside2.1/$prefix; cvs update @ARGV ) && ",
+ "cvs diff -u @ARGV | ( cd /home/$USER/freeside2.1/$prefix; patch -p0 ) ",
+ " && ( ( cvs commit -m $desc @ARGV & ); ",
+ "( sleep 1;cd /home/$USER/freeside2.1/$prefix; cvs commit -m $desc @ARGV & ) )"
+);
+