adding export to read mailbox status information, RT#15987
[freeside.git] / bin / 21add
1 #!/usr/bin/perl
2
3 use Cwd;
4 use String::ShellQuote;
5
6 my $USER = $ENV{USER};
7
8 my $dir = getcwd;
9 ( my $prefix = $dir ) =~ s(^/home/$USER/freeside/?)() or die $dir; #eventually from anywhere
10
11 system join('',
12   #"cvs add @ARGV && ",
13   "cvs add @ARGV ; ",
14   "( for file in @ARGV; do ",
15      "cp -i \$file /home/$USER/freeside2.1/$prefix/`dirname \$file`;",
16   "done ) && ",
17   "cd /home/$USER/freeside2.1/$prefix/ && ",
18   "cvs add @ARGV"
19 );
20