Commit ee71bfc4 authored by Anton Midyukov's avatar Anton Midyukov

docs: move indexhtml up one level

So as not to hide it too deeply.
parent 84aaf54d
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# trailing slash is important here # trailing slash is important here
dest="docs/" dest="docs/"
mkdir -p "$WORKDIR/$dest"
cd $WORKDIR cd $WORKDIR
nonfatal() { echo "** $*" >&2; exit 0; } nonfatal() { echo "** $*" >&2; exit 0; }
...@@ -24,13 +23,13 @@ find "$indexdir" -xtype l 2>/dev/null -exec rm {} \; ...@@ -24,13 +23,13 @@ find "$indexdir" -xtype l 2>/dev/null -exec rm {} \;
cp -aL "$indexdir" "$dest" cp -aL "$indexdir" "$dest"
# delete links with absolute PATH # delete links with absolute PATH
sed -i -e '/file:\/\/\//d' -e '/href="\//d' "$dest"/indexhtml/index-*.html sed -i -e '/file:\/\/\//d' -e '/href="\//d' "$dest"/index-*.html
mkredir() { mkredir() {
cat >"${1}index.html" <<-EOF cat >"${1}index.html" <<-EOF
<html> <html>
<head> <head>
<meta http-equiv="refresh" content="0;url=${2}indexhtml/index.html"> <meta http-equiv="refresh" content="0;url=${2}index.html">
<title>Redirecting...</title> <title>Redirecting...</title>
</head> </head>
<body> <body>
...@@ -40,11 +39,10 @@ mkredir() { ...@@ -40,11 +39,10 @@ mkredir() {
EOF EOF
} }
mkredir "" "$dest" # /index.html -> docs/indexhtml/index.html mkredir "" "$dest" # /index.html -> docs/index.html
mkredir "$dest" "" # docs//index.html -> indexhtml/index.html
docdir="/usr/share/doc/documentation" docdir="/usr/share/doc/documentation"
if [ -d "$docdir" ] && [ ! -d "$dest"/indexhtml/documentation ]; then if [ -d "$docdir" ] && [ ! -d "$dest"/documentation ]; then
### no need to replace symlinks with hardlinks by now? (-aH) ### no need to replace symlinks with hardlinks by now? (-aH)
cp -aH "$docdir" "$dest" cp -aH "$docdir" "$dest"
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment