Files
cappuccino/Tools/Documentation/preprocess/002.make_headers.sh
T
Aparajita Fishman be5bbdcb32 Another overhaul of doc generation.
- Added generic facility for pre- and post-processor scripts to be run.
- Added support utility script for inclusion by processors.
- Totally overhauled css to make the pages more readable (I hope).
- Fixed some doc errors in CPTableView.
- Don't generate XML.
- Added colorize() and colorPrint() functions to common.jake.
- Added docs-no-frame task for generating docs without a sidebar frame.
2011-05-12 14:41:54 -04:00

35 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
#
# NOTE: The working directory should be the main capp directory when this script is run
#
# $1 Cappuccino documentation directory
# Do this if you want to use the utility functions
source "$1"/processor_setup.sh
if [ -d AppKit.doc ]; then
rm -rf AppKit.doc
fi
if [ -d Foundation.doc ]; then
rm -rf Foundation.doc
fi
# Tar all of the AppKit/*.j files, excluding any files that begin with "_", and replace
# "AppKit" with "AppKit.doc" in the files path within the archive. Then unarchive the result.
# This turns out to be the quickest way I could find to get the correct files and rename them.
processor_msg "Collecting source files..."
bsdtar cf AppKit.doc.tar --exclude='_*' -s /^AppKit/AppKit.doc/ AppKit/*.j AppKit/**/*.j
bsdtar xf AppKit.doc.tar
rm AppKit.doc.tar
# Now do the same thing with Foundation files.
bsdtar cf Foundation.doc.tar --exclude='_*' -s /^Foundation/Foundation.doc/ Foundation/*.j Foundation/**/*.j
bsdtar xf Foundation.doc.tar
rm Foundation.doc.tar
# Remove @import from the source files, doxygen doesn't know what to do with them
processor_msg "Removing @import from source files..."
find AppKit.doc -name *.j -exec sed -e '/@import.*/ d' -i '' {} \;
find Foundation.doc -name *.j -exec sed -e '/@import.*/ d' -i '' {} \;