aboutsummaryrefslogtreecommitdiffstats
path: root/mgagit
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mars-attacks.org>2013-10-07 14:54:31 +0200
committerNicolas Vigier <boklm@mars-attacks.org>2013-10-07 14:54:31 +0200
commitf4d92bf6686072b0889e9843cf55ac8d0ad1a59a (patch)
tree5880827896366365fcddd4a64847016fcacb9c8e /mgagit
parentf1b90f46724539d5384bcd8c2be92aafc650bc85 (diff)
downloadmgagit-f4d92bf6686072b0889e9843cf55ac8d0ad1a59a.tar
mgagit-f4d92bf6686072b0889e9843cf55ac8d0ad1a59a.tar.gz
mgagit-f4d92bf6686072b0889e9843cf55ac8d0ad1a59a.tar.bz2
mgagit-f4d92bf6686072b0889e9843cf55ac8d0ad1a59a.tar.xz
mgagit-f4d92bf6686072b0889e9843cf55ac8d0ad1a59a.zip
Add the showconf command, to show repos configuration in yaml
Diffstat (limited to 'mgagit')
-rwxr-xr-xmgagit16
1 files changed, 16 insertions, 0 deletions
diff --git a/mgagit b/mgagit
index 7cb960c..a9387ae 100755
--- a/mgagit
+++ b/mgagit
@@ -2,6 +2,7 @@
use strict;
use MGA::Git;
+use YAML;
#use Data::Dump qw/dd/;
my %actions = (
@@ -33,6 +34,15 @@ $0 usage [action]
Show action usage
END
},
+ showconf => {
+ run => \&showconf,
+ descr => 'Show YAML mgagit configuration',
+ usage => <<END,
+$0 showconf
+
+Show YAML mgagit configuration
+END
+ },
);
sub usage {
@@ -79,6 +89,12 @@ sub glrun {
MGA::Git::run_gitolite(\%r);
}
+sub showconf {
+ my %r;
+ MGA::Git::load_gitrepos(\%r);
+ print YAML::Dump(\%r);
+}
+
if (@ARGV == 0 || !$actions{$ARGV[0]}) {
usageexit();
}