Introduce Habitent loin people
This commit is contained in:
parent
73b1552199
commit
ff9c3a5ad2
5 changed files with 15 additions and 4 deletions
|
|
@ -38,8 +38,12 @@ sub tinyglob
|
||||||
elsif ($str[$i] eq '*') {
|
elsif ($str[$i] eq '*') {
|
||||||
$res .= '.*';
|
$res .= '.*';
|
||||||
}
|
}
|
||||||
|
elsif ($metaescape) {
|
||||||
|
$res .= $str[$i];
|
||||||
|
$metaescape = 0;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
croak "Invalid number of \\ in '$orig'";
|
$res .= "\\".$str[$i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -55,6 +59,8 @@ sub match
|
||||||
my $glob = tinyglob(shift);
|
my $glob = tinyglob(shift);
|
||||||
my $str = shift;
|
my $str = shift;
|
||||||
|
|
||||||
|
say $glob;
|
||||||
|
|
||||||
return $str =~ /$glob/;
|
return $str =~ /$glob/;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,9 @@ is(Tinyglob::tinyglob("\\*"), "\\*");
|
||||||
is(Tinyglob::tinyglob("\\\\*"), "\\\\.*");
|
is(Tinyglob::tinyglob("\\\\*"), "\\\\.*");
|
||||||
is(Tinyglob::tinyglob("\\?"), "\\?");
|
is(Tinyglob::tinyglob("\\?"), "\\?");
|
||||||
is(Tinyglob::tinyglob("\\\\?"), "\\\\.");
|
is(Tinyglob::tinyglob("\\\\?"), "\\\\.");
|
||||||
|
is(Tinyglob::tinyglob("\\."), "\\.");
|
||||||
|
is(Tinyglob::tinyglob("\\\\."), "\\\\\\.");
|
||||||
|
is(Tinyglob::tinyglob("a*b?"), "a.*b.");
|
||||||
|
|
||||||
ok(! Tinyglob::match("?", ""));
|
ok(! Tinyglob::match("?", ""));
|
||||||
ok(! Tinyglob::match("b", "a"));
|
ok(! Tinyglob::match("b", "a"));
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ my $promo = qx(git config hooks.promo);
|
||||||
my $id_project = qx(git config hooks.idproject);
|
my $id_project = qx(git config hooks.idproject);
|
||||||
my $repo_login = qx(git config hooks.repologin);
|
my $repo_login = qx(git config hooks.repologin);
|
||||||
|
|
||||||
|
my @habitent_loin = ("amed_m", "bellev_m", "freima_m", "ikouna_l");
|
||||||
|
|
||||||
# First, check if the repository is in the YYYY/ directory
|
# First, check if the repository is in the YYYY/ directory
|
||||||
exit 0 if (($promo && $id_project && $repo_login) || $ENV{GL_REPO} !~ /^2[0-9]{3}\/.+\/.+/);
|
exit 0 if (($promo && $id_project && $repo_login) || $ENV{GL_REPO} !~ /^2[0-9]{3}\/.+\/.+/);
|
||||||
|
|
||||||
|
|
@ -46,6 +48,8 @@ if ($ip->overlaps($labnetwork) == $IP_A_IN_B_OVERLAP)
|
||||||
# exit 1;
|
# exit 1;
|
||||||
#}
|
#}
|
||||||
|
|
||||||
|
return 0 if (grep { /\Q$repo_login\E/ } @habitent_loin);
|
||||||
|
|
||||||
my $schoolnetwork = Net::IP->new('10.41.0.0/16');
|
my $schoolnetwork = Net::IP->new('10.41.0.0/16');
|
||||||
#my $vjschoolnetwork = Net::IP->new('10.3.0.0/16');
|
#my $vjschoolnetwork = Net::IP->new('10.3.0.0/16');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ sub run_moulette
|
||||||
opendir(my $dh, $submitdir) or die "Can't list files in $submitdir: $!";
|
opendir(my $dh, $submitdir) or die "Can't list files in $submitdir: $!";
|
||||||
while (readdir($dh))
|
while (readdir($dh))
|
||||||
{
|
{
|
||||||
if (/([a-zA-Z0-9_-]+).ff$/ && -f "$submitdir/$_") {
|
if (/([a-zA-Z0-9_-]+).ff$/ && -f "$submitdir/$_" && ! /^tests\.ff$/) {
|
||||||
push @logins, $1;
|
push @logins, $1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,6 @@ use File::Basename;
|
||||||
use Mail::Internet;
|
use Mail::Internet;
|
||||||
use Pod::Usage;
|
use Pod::Usage;
|
||||||
|
|
||||||
use lib "../../";
|
|
||||||
|
|
||||||
use ACU::Log;
|
use ACU::Log;
|
||||||
use ACU::LDAP;
|
use ACU::LDAP;
|
||||||
use ACU::Process;
|
use ACU::Process;
|
||||||
|
|
|
||||||
Reference in a new issue