summaryrefslogtreecommitdiff
path: root/usr/src/pinyadmin/bin/pinyconfig
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/pinyadmin/bin/pinyconfig')
-rwxr-xr-xusr/src/pinyadmin/bin/pinyconfig18
1 files changed, 18 insertions, 0 deletions
diff --git a/usr/src/pinyadmin/bin/pinyconfig b/usr/src/pinyadmin/bin/pinyconfig
new file mode 100755
index 0000000..ec8e80a
--- /dev/null
+++ b/usr/src/pinyadmin/bin/pinyconfig
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Piny;
+
+my ( $reponame, $attr, $value ) = @ARGV;
+
+$attr =~ s/\./_/g;
+
+my $repo = Piny::Repo->new( $reponame );
+
+if ( defined $value ) {
+ $repo->config->$attr( $value );
+};
+
+print "$attr = " . $repo->config->$attr . "\n";