#!/usr/bin/perl use strict; use warnings; use Piny; my $env = Piny::Environment->instance( ); my ( $reponame, @users ) = @ARGV; my $repo = Piny::Repo->new( $reponame ); if ( $env->user->uid != 0 and $repo->owner->uid != $env->user->uid ) { print "You are not the owner of that repo!\n"; exit( 3 ); }; $repo->add_access( map { Piny::User->new( $_ ) } @users );