source: trunk/LATMOS-Accounts/bin/la-sql-rev @ 2380

Last change on this file since 2380 was 1045, checked in by nanardon, 12 years ago
  • add real-life test for scripts
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 718 bytes
Line 
1#!/usr/bin/perl
2
3use strict;
4use warnings;
5use LATMOS::Accounts;
6use Getopt::Long;
7use Pod::Usage;
8
9=head1 NAME
10
11    la-rev - Show current base revision
12
13=head1 SYNOPSIS
14
15    la-rev
16
17=cut
18
19GetOptions(
20    'c|config=s' => \my $config,
21    'b|base=s'   => \my $base,
22    'help'       => sub { pod2usage(0); },
23) or pod2usage();
24
25=head1 OPTIONS
26
27=over 4
28
29=item -c|--config configdir
30
31Use this configuration directory instead of the default one.
32
33=item -b|--base basename
34
35Query this specific base instead of the default one.
36
37=back
38
39=cut
40
41my $LA = LATMOS::Accounts->new($config, noacl => 1);
42my $labase = $LA->base($base);
43$labase && $labase->load or die "Cannot load base";
44
45print $labase->current_rev . "\n";
46
47exit(0);
Note: See TracBrowser for help on using the repository browser.