From fe0b66e6dbf1d82e29860c8a8315dd0181f7fd9e Mon Sep 17 00:00:00 2001 From: "Sebastian J. Mielke" Date: Sat, 20 Aug 2016 15:41:27 +0200 Subject: [PATCH] link list .htaccess generation --- nopanic.tex | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/nopanic.tex b/nopanic.tex index c533fd0..9c575bc 100644 --- a/nopanic.tex +++ b/nopanic.tex @@ -34,9 +34,7 @@ \fi % % Link system output: - % Copypasting the output of the following lines into a text file, then run and execute the result of: - % awk '{print "mkdir " $1 " && echo \"\" > " $1 "/index.php"}' - %\expandafter\g@addto@macro\expandafter\linklist\expandafter{\expandafter&\expandafter\tiny\@linknumber\ \url{#1}\\}% + \immediate\write\linklistfile{RewriteRule "^\@linknumber$" "#1"}% % \stepcounter{linkcounter}% }{% @@ -65,6 +63,13 @@ \mbox{} %brauche leeren Content für ne newpage %\newpage +% Linklist output +% All this stuff needs is immediate to avoid confusion between links on the same page +\immediate\newwrite\linklistfile +\immediate\openout\linklistfile=kopimi.htaccess\relax +\immediate\write\linklistfile{RewriteEngine On} +\immediate\write\linklistfile{RewriteBase /2016} + \include{texte/zeitplan} \include{texte/checkliste_kurz} \tableofcontents @@ -82,6 +87,9 @@ \include{texte/campusplan} \include{cover/back} +% Always close your files :) +\immediate\closeout\linklistfile + %to be merged and deleted: {zih}, {fsr, auditorium}, {danksagung} %entirely deleted: fluechtlinge, cd, werbung