#!/usr/bin/perl
#------------------------------------------------------------
# Copyright (C) 2009 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
use strict;

use Getopt::Std;

use lib '/app/tools/common/lib';
use lib '/app/tools/rps/lib';
use RPS::MapFace::Mapper;

use Common::NumericFormat;
use Common::Log;
use Common::RSApp;

# Allow tuning of the verbosity of our output.
#
my $gVerbosityLevel = 1;

Common::Log::Print(" - running with args '@ARGV'");

my %opt;
getopts( 'c:', \%opt );

my $client_id = $opt{c};

usage("missing client_id") unless ( defined $client_id );

my $appSingleton = Common::RSApp->new( clientID => $client_id );

my $mapper = RPS::MapFace::Mapper->new( clientID => $client_id );
$mapper->run();

sub usage {
    my $err = shift;

    print "$err\n\n" if ($err);

    print <<EOF;
usage: $0 [-re] -c CLIENT_ID

-c CLIENT_ID : is the client ID
EOF

    exit;
}

