add default index
This commit is contained in:
parent
439bbd1258
commit
6544c009e2
2 changed files with 22 additions and 2 deletions
|
@ -10,5 +10,5 @@ COPY footer.html .
|
||||||
|
|
||||||
RUN ./generate.sh -o
|
RUN ./generate.sh -o
|
||||||
|
|
||||||
COPY www /usr/share/nginx/html
|
COPY www/ /usr/share/nginx/html/
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
22
generate.sh
22
generate.sh
|
@ -150,11 +150,31 @@ do
|
||||||
sed -i -e "s/%file%/$i/" $file
|
sed -i -e "s/%file%/$i/" $file
|
||||||
sed -i -e "s/%lang%/$l/" $file
|
sed -i -e "s/%lang%/$l/" $file
|
||||||
done
|
done
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "Copy $annexes in $target..."
|
||||||
cp -t $target -r $annexes
|
cp -t $target -r $annexes
|
||||||
|
|
||||||
|
echo "Generate default index page..."
|
||||||
|
cp $target/$defaultLang/index.html $target
|
||||||
|
for c in $(awk 'BEGIN {
|
||||||
|
FS = "\n";
|
||||||
|
code = 0
|
||||||
|
}
|
||||||
|
{
|
||||||
|
if ($0 ~ /id="header-links"/) {
|
||||||
|
code = 1
|
||||||
|
next
|
||||||
|
} else if ($0 ~ /\/div/) {
|
||||||
|
code = 0
|
||||||
|
} if (code) {
|
||||||
|
print NR
|
||||||
|
}
|
||||||
|
}' www/index.html)
|
||||||
|
do
|
||||||
|
sed -i -e "$c s/href=\"/href=\"$defaultLang\//" $target/index.html
|
||||||
|
done
|
||||||
|
|
||||||
echo "Link Links (lul)"
|
echo "Link Links (lul)"
|
||||||
ln -s $pathLinks $target
|
ln -s $pathLinks $target
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue