aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklondike <klondike@xiscosoft.es>2010-11-12 19:42:37 +0100
committerklondike <klondike@xiscosoft.es>2010-11-12 19:42:37 +0100
commitbecf64f071215a3682a0318abd5c1483de07eda1 (patch)
treecc8d16870c0786100b37c10611162a403dd4391a /dopreview.sh
parentReferencing the debugging doc (diff)
downloadhardened-docs-becf64f071215a3682a0318abd5c1483de07eda1.tar.gz
hardened-docs-becf64f071215a3682a0318abd5c1483de07eda1.tar.bz2
hardened-docs-becf64f071215a3682a0318abd5c1483de07eda1.zip
Now the HTML generation will point to this tree which is cool :D
Diffstat (limited to 'dopreview.sh')
-rwxr-xr-xdopreview.sh28
1 files changed, 19 insertions, 9 deletions
diff --git a/dopreview.sh b/dopreview.sh
index 7ca3232..6150e29 100755
--- a/dopreview.sh
+++ b/dopreview.sh
@@ -15,15 +15,25 @@ if [ -z "$(whereis -b gorg | cut -d: -f2)" ];
exit 1;
fi
-for FILE in `find xml/ -iname '*.xml'`;
+rm -r html/
+for FILE in `find xml/ -type f`;
do
- output=${FILE%.xml}.html
- output=html/${output#xml/}
+ output=html/${FILE#xml/}
mkdir -p `dirname $output`
- gorg < $FILE | \
- sed -e 's|"/css/main.css"|"http://www.gentoo.org/css/main.css"|g' \
- -e 's|"../../../|"http://www.gentoo.org/|g' \
- -e 's|"/images/|"http://www.gentoo.org/images/|g' \
- -e 's|"/|"http://www.gentoo.org/|g' | \
- tr -d "\302" | tr -d "\240" > $output;
+ case $FILE in
+ *.xml)
+ output=${output%.xml}.html
+ gorg < $FILE | \
+ sed -e 's|"/css/main.css"|"http://www.gentoo.org/css/main.css"|g' \
+ -e 's|"../../../|"http://www.gentoo.org/|g' \
+ -e 's|"/images/|"http://www.gentoo.org/images/|g' \
+ -e 's|"/|"http://www.gentoo.org/|g' \
+ -e 's|"http://www.gentoo.org/proj/en/hardened/\([^"]*\).xml"|"\1.html"|g' \
+ -e 's|"http://www.gentoo.org/proj/en/hardened/\([^"]*\)"|"\1"|g' | \
+ tr -d "\302" | tr -d "\240" > $output;
+ ;;
+ *)
+ cp $FILE $output
+ ;;
+ esac
done