[freeside-commits] freeside/FS/bin freeside-cdr-sftp_and_import, 1.9, 1.10
Erik Levinson
levinse at wavetail.420.am
Wed Jun 22 11:22:07 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv24887/FS/bin
Modified Files:
freeside-cdr-sftp_and_import
Log Message:
freeside-cdr-sftp_and_import: add an option to gunzip imported files, RT10991
Index: freeside-cdr-sftp_and_import
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-cdr-sftp_and_import,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -d -r1.9 -r1.10
--- freeside-cdr-sftp_and_import 22 Jun 2011 17:22:51 -0000 1.9
+++ freeside-cdr-sftp_and_import 22 Jun 2011 18:22:05 -0000 1.10
@@ -96,7 +96,13 @@
my $ungziped = $filename;
my $ungziped =~ s/\.gz$//;
- system("gunzip $cachedir/$filename") if $opt_g;
+ if ( $opt_g ) {
+ if(system('gunzip', "$cachedir/$filename") != 0) {
+ warn "gunzip of '$cachedir/$filename' failed" if $opt_v;
+ unlink "$cachedir/$filename";
+ next;
+ }
+ }
my $import_options = {
'file' => "$cachedir/$ungziped",
More information about the freeside-commits
mailing list