projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a40c575
)
my silly multi-branch tools
author
Ivan Kohler
<ivan@freeside.biz>
Fri, 10 May 2013 07:47:12 +0000
(
00:47
-0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Fri, 10 May 2013 07:47:12 +0000
(
00:47
-0700)
bin/3add
[new file with mode: 0755]
patch
|
blob
diff --git a/bin/3add
b/bin/3add
new file mode 100755
(executable)
index 0000000..
8bc034d
--- /dev/null
+++ b/
bin/3add
@@ -0,0
+1,19
@@
+#!/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('',
+ "git add @ARGV ; ",
+ "( for file in @ARGV; do ",
+ "cp -i \$file /home/$USER/freeside3/$prefix/`dirname \$file`;",
+ "done ) && ",
+ "cd /home/$USER/freeside3/$prefix/ && ",
+ "git add @ARGV"
+);
+