projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
81451a5
)
add -b flag for binary mode, RT#23382
author
Ivan Kohler
<ivan@freeside.biz>
Wed, 26 Jun 2013 22:03:25 +0000
(15:03 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Wed, 26 Jun 2013 22:03:25 +0000
(15:03 -0700)
FS/bin/freeside-cdr-sftp_and_import
patch
|
blob
|
history
diff --git
a/FS/bin/freeside-cdr-sftp_and_import
b/FS/bin/freeside-cdr-sftp_and_import
index
a7452e8
..
aa1b394
100755
(executable)
--- a/
FS/bin/freeside-cdr-sftp_and_import
+++ b/
FS/bin/freeside-cdr-sftp_and_import
@@
-12,8
+12,8
@@
use FS::cdr;
# parse command line
###
# parse command line
###
-use vars qw( $opt_m $opt_p $opt_r $opt_e $opt_d $opt_v $opt_P $opt_a $opt_c $opt_g $opt_s );
-getopts('c:m:p:r:e:d:v:P:ags');
+use vars qw( $opt_m $opt_p $opt_r $opt_e $opt_d $opt_v $opt_P $opt_a $opt_c $opt_g $opt_s
$opt_b
);
+getopts('c:m:p:r:e:d:v:P:ags
b
');
$opt_e ||= 'csv';
#$opt_e = ".$opt_e" unless $opt_e =~ /^\./;
$opt_e ||= 'csv';
#$opt_e = ".$opt_e" unless $opt_e =~ /^\./;
@@
-176,6
+176,7
@@
sub ftp {
or die "FTP connection to '$hostname' failed.";
$ftp->login($ftp_user, $ftp_pass) or die "FTP login failed: ".$ftp->message;
$ftp->cwd($opt_r) or die "can't chdir to $opt_r\n" if $opt_r;
or die "FTP connection to '$hostname' failed.";
$ftp->login($ftp_user, $ftp_pass) or die "FTP login failed: ".$ftp->message;
$ftp->cwd($opt_r) or die "can't chdir to $opt_r\n" if $opt_r;
+ $ftp->binary or die "can't set BINARY mode: ". $ftp->message if $opt_b;
return $ftp;
}
return $ftp;
}
@@
-221,6
+222,8
@@
or FTP and then import them into the database.
-a: use ftp passive mode
-a: use ftp passive mode
+-b: use ftp binary mode
+
-v: set verbosity level; this script only has one level, but it will
be passed as the 'debug' argument to the transport method
-v: set verbosity level; this script only has one level, but it will
be passed as the 'debug' argument to the transport method