summaryrefslogtreecommitdiff
path: root/cad/src/tools/SEMBot/updateNE1_Documentation.sh
blob: b71b3207d2d1f77d342b5f382279a44ed3c8ed49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

# Usage: ./updateNE1_Documentation.sh &>NE1_Docs.log

# Create timestamp
echo `date +"%a %b %e %T EDT %Y"` > NE1_Docs.timestamp

# Remove files used to check for command successes
rm -f NE1_Documentation/api-objects.txt

# Run Epydoc
pushd SVN-D/cad/src
/usr/local/bin/epydoc --config epydoc.config
popd

# Check if Epydoc was successful by checking for the existence of the file we
# deleted earlier.
if [ ! -e NE1_Documentation/api-objects.txt ]; then
  RESULT="<font color=red>Failed</font>"
else
  RESULT=Success
fi
echo ${RESULT} > NE1_Docs.result

# Format image tags to html
for file in `find NE1_Documentation -name "*.html"`; do
  sed 's/IMAGE(\([^"]\+\))/<img src="\1">/g' < $file > tmp.html
  mv tmp.html $file
done