summaryrefslogtreecommitdiff
path: root/bin/231add
blob: c4b5437b449ffdc54ad69fa9a31c9d13d39c880e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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/freeside2.3/$prefix/`dirname \$file`;",
     "cp -i \$file /home/$USER/freeside2.1/$prefix/`dirname \$file`;",
  "done ) && ",
  "cd /home/$USER/freeside2.3/$prefix/ && ",
  "git add @ARGV; ",
  "cd /home/$USER/freeside2.1/$prefix/ && ",
  "git add @ARGV"
);