summaryrefslogtreecommitdiff
path: root/usr/src/pinyadmin/bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/pinyadmin/bin')
-rwxr-xr-xusr/src/pinyadmin/bin/lsaccess2
-rwxr-xr-xusr/src/pinyadmin/bin/lsrepo2
-rwxr-xr-xusr/src/pinyadmin/bin/pinyconfig18
3 files changed, 19 insertions, 3 deletions
diff --git a/usr/src/pinyadmin/bin/lsaccess b/usr/src/pinyadmin/bin/lsaccess
index b55900c..ce41fc4 100755
--- a/usr/src/pinyadmin/bin/lsaccess
+++ b/usr/src/pinyadmin/bin/lsaccess
@@ -5,7 +5,7 @@ use warnings;
use Piny;
-my $env = Piny::Environment->new( );
+my $env = Piny::Environment->instance( );
my ( $reponame ) = @ARGV;
diff --git a/usr/src/pinyadmin/bin/lsrepo b/usr/src/pinyadmin/bin/lsrepo
index 1587654..2d88eb5 100755
--- a/usr/src/pinyadmin/bin/lsrepo
+++ b/usr/src/pinyadmin/bin/lsrepo
@@ -5,8 +5,6 @@ use warnings;
use Piny;
-my $env = Piny::Environment->new( );
-
foreach my $repo ( Piny::Repo->all_repos( ) ) {
print $repo->name . "\n";
};
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";