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
|
Rev | Line | |
---|
[837] | 1 | #!/usr/bin/perl |
---|
| 2 | |
---|
| 3 | use strict; |
---|
| 4 | use warnings; |
---|
| 5 | use LATMOS::Accounts; |
---|
| 6 | use Getopt::Long; |
---|
| 7 | use 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 | |
---|
| 19 | GetOptions( |
---|
| 20 | 'c|config=s' => \my $config, |
---|
| 21 | 'b|base=s' => \my $base, |
---|
[1045] | 22 | 'help' => sub { pod2usage(0); }, |
---|
[837] | 23 | ) or pod2usage(); |
---|
| 24 | |
---|
| 25 | =head1 OPTIONS |
---|
| 26 | |
---|
| 27 | =over 4 |
---|
| 28 | |
---|
[861] | 29 | =item -c|--config configdir |
---|
[837] | 30 | |
---|
[861] | 31 | Use this configuration directory instead of the default one. |
---|
[837] | 32 | |
---|
| 33 | =item -b|--base basename |
---|
| 34 | |
---|
| 35 | Query this specific base instead of the default one. |
---|
| 36 | |
---|
[1023] | 37 | =back |
---|
| 38 | |
---|
[837] | 39 | =cut |
---|
| 40 | |
---|
| 41 | my $LA = LATMOS::Accounts->new($config, noacl => 1); |
---|
[1044] | 42 | my $labase = $LA->base($base); |
---|
[837] | 43 | $labase && $labase->load or die "Cannot load base"; |
---|
| 44 | |
---|
| 45 | print $labase->current_rev . "\n"; |
---|
| 46 | |
---|
| 47 | exit(0); |
---|
Note: See
TracBrowser
for help on using the repository browser.