summaryrefslogtreecommitdiff
path: root/bin/cdr.import
blob: b2e8d91271bf532f0aced89458404695a045bd83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl
#
# Usage:
#  cdr.import user format filename
#

use strict;
use FS::UID qw(adminsuidsetup);
use FS::cdr;

my $user = shift or die &usage;
adminsuidsetup $user;

my $format = shift or die &usage;

my $error = FS::cdr::batch_import( {
  'file'   => shift,
  'format' => $format,
} );
die $error if $error;

sub usage {
  "Usage: \n  cdr.import user format filename\n";
}