Merge branch 'master' of ssh://cpp/liblerdorf
This commit is contained in:
commit
98efe85166
2 changed files with 5 additions and 2 deletions
|
@ -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");
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Reference in a new issue