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