Oops needed to remove outputs/spice from configure.ac as well
[geda-gaf.git] / docs / scripts / postproc.sh
blob6d229d33b8a95f8eb220b9dede60cce88bda8763
1 #!/bin/sh
3 if [ ! -e "geda_faq.html" ]
4 then
5 echo "You must start this program in the toplevel wiki directory"
6 echo "wherever geda_faq.html lives."
7 exit 1
8 fi
10 if [ ! -e "../scripts/removedups.sh" ]
11 then
12 echo "../scripts/removedups.sh must exist"
13 exit 1
16 files=`find . -name \*.html -print`
18 for i in $files
20 echo $i
21 mv -f $i $i.old
22 cat $i.old | sed '/\<script type/d' > $i
24 rm -f $i.old
26 mv -f $i $i.old2
27 isdetail=`echo $i | grep _detail`
28 if [ "$isdetail" = "" ]
29 then
30 cat $i.old2 | \
31 sed 's%media="all" type="text/css" href="http://geda.seul.org/wiki/lib/exe/css.php?s=all"%media="all" type="text/css" href="lib/exe/css"%g' | \
32 sed 's%media="screen" type="text/css" href="http://geda.seul.org/wiki/lib/exe/css.php"%media="screen" type="text/css" href="lib/exe/001css"%g' | \
33 sed 's%media="print" type="text/css" href="http://geda.seul.org/wiki/lib/exe/css.php?s=print"%media="print" type="text/css" href="lib/exe/002css"%g' \
34 > $i
35 else
36 cat $i.old2 | \
37 sed 's%media="all" type="text/css" href="http://geda.seul.org/wiki/lib/exe/css.php?s=all"%media="all" type="text/css" href="../lib/exe/css"%g' | \
38 sed 's%media="screen" type="text/css" href="http://geda.seul.org/wiki/lib/exe/css.php"%media="screen" type="text/css" href="../lib/exe/001css"%g' | \
39 sed 's%media="print" type="text/css" href="http://geda.seul.org/wiki/lib/exe/css.php?s=print"%media="print" type="text/css" href="../lib/exe/002css"%g' \
40 > $i
44 rm -f $i.old2
46 done
48 # Remove duplicate images from _detail
49 ../scripts/removedups.sh 001
50 ../scripts/removedups.sh 002
51 rm -f _media/001*.png _media/001*.jpg _media/002*.png _media/002*.jpg