Archived
1
0
Fork 0

Merge branch 'master' of ssh://cpp/liblerdorf

This commit is contained in:
Root Cpp Charlie 2013-09-30 10:53:35 +02:00
commit 98efe85166
2 changed files with 5 additions and 2 deletions

View file

@ -9,11 +9,14 @@ use Net::IP;
use ACU::Log;
$ACU::Log::log_file = "/var/log/hooks/" . basename($0) . ".log";
my $ip = $1 if ($ENV{'SSH_CLIENT'} =~ m/([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*/);
log DEBUG, "Connection to $ENV{GL_REPO} from $ip";
# First, check if the repository is in the YYYY/ directory
exit 0 if ($ENV{GL_REPO} !~ /^2[0-9]{3}\/.+\/.+/);
my $ip = $1 if ($ENV{'SSH_CLIENT'} =~ m/([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*/);
say "Votre IP est : $ip.";
$ip = Net::IP->new($ip) or die ("IP invalide");

View file

@ -44,7 +44,7 @@ clean_tex()
sed -Ei 's/\\verb ([^+]+) /\\verb+\1+/g' "$i"
# Special macros
sed -Ei 's/\\(file|email|command) *\{([^}]+)}/\\verb+\1+/gi' "$i"
sed -Ei 's/\\(file|email|command) *\{([^{]*\{[^}]*\})*([^}]*)}/\\verb+\2\3+/gi' "$i"
sed -Ei 's/\\begin *\{assistant\}/\\verb+%%assistant-begin+/g' "$i"
sed -Ei 's/\\end *\{assistant\}/\\verb+%%assistant-end+/g' "$i"