diff options
Diffstat (limited to 'usr/src/pinyadmin')
-rwxr-xr-x | usr/src/pinyadmin/bin/lsaccess | 2 | ||||
-rwxr-xr-x | usr/src/pinyadmin/bin/lsrepo | 2 | ||||
-rwxr-xr-x | usr/src/pinyadmin/bin/pinyconfig | 18 | ||||
-rwxr-xr-x | usr/src/pinyadmin/sbin/addaccess | 2 | ||||
-rwxr-xr-x | usr/src/pinyadmin/sbin/rmaccess | 2 | ||||
-rwxr-xr-x | usr/src/pinyadmin/sbin/rmrepo | 2 |
6 files changed, 22 insertions, 6 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"; diff --git a/usr/src/pinyadmin/sbin/addaccess b/usr/src/pinyadmin/sbin/addaccess index 8d0cef9..e351114 100755 --- a/usr/src/pinyadmin/sbin/addaccess +++ b/usr/src/pinyadmin/sbin/addaccess @@ -5,7 +5,7 @@ use warnings; use Piny; -my $env = Piny::Environment->new( ); +my $env = Piny::Environment->instance( ); my ( $reponame, @users ) = @ARGV; diff --git a/usr/src/pinyadmin/sbin/rmaccess b/usr/src/pinyadmin/sbin/rmaccess index f84fba0..d6c22a9 100755 --- a/usr/src/pinyadmin/sbin/rmaccess +++ b/usr/src/pinyadmin/sbin/rmaccess @@ -5,7 +5,7 @@ use warnings; use Piny; -my $env = Piny::Environment->new( ); +my $env = Piny::Environment->instance( ); my ( $reponame, @users ) = @ARGV; diff --git a/usr/src/pinyadmin/sbin/rmrepo b/usr/src/pinyadmin/sbin/rmrepo index 8b26feb..e12a067 100755 --- a/usr/src/pinyadmin/sbin/rmrepo +++ b/usr/src/pinyadmin/sbin/rmrepo @@ -5,7 +5,7 @@ use warnings; use Piny; -my $env = Piny::Environment->new; +my $env = Piny::Environment->instance( ); foreach my $reponame ( @ARGV ) { |