2.3 branch
[freeside.git] / bin / 23add
diff --git a/bin/23add b/bin/23add
new file mode 100755 (executable)
index 0000000..3c99ed8
--- /dev/null
+++ b/bin/23add
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+
+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
+
+system join('',
+  #"cvs add @ARGV && ",
+  "cvs add @ARGV ; ",
+  "( for file in @ARGV; do ",
+     "cp -i \$file /home/$USER/freeside2.3/$prefix/`dirname \$file`;",
+  "done ) && ",
+  "cd /home/$USER/freeside2.3/$prefix/ && ",
+  "cvs add @ARGV"
+);
+