aboutsummaryrefslogtreecommitdiffhomepage
path: root/build_tools
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-12-27 21:39:11 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-12-27 21:39:11 -0800
commitabf3ee65632fc6b8a3966b58ef683f299e4db26c (patch)
tree6a79e0a4047bce74361621255ac61354cb756f3f /build_tools
parent1a0a3d85ca14106a2ecb5be5dd0de0e7d186d59f (diff)
Another attempt to make build_documentation.sh work in Linux
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/build_documentation.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/build_tools/build_documentation.sh b/build_tools/build_documentation.sh
index 8e9f6939..75202506 100755
--- a/build_tools/build_documentation.sh
+++ b/build_tools/build_documentation.sh
@@ -55,12 +55,13 @@ done
# Make some extra stuff to pass to doxygen
# Input is kept as . because we cd to the input directory beforehand
# This prevents doxygen from generating "documentation" for intermediate directories
-read -d '' DOXYPARAMS <<EOF
+DOXYPARAMS=$(cat <<EOF
PROJECT_NUMBER=2.0.0
INPUT=.
OUTPUT_DIRECTORY=$OUTPUTDIR
QUIET=YES
EOF
+);
# echo "$DOXYPARAMS"
@@ -74,11 +75,14 @@ cd "$TMPLOC"
# Remember errors
RESULT=$?
-if test $RESULT == 0; then
+cd "${OUTPUTDIR}/man/man1/"
+if test "$RESULT" = 0 ; then
# Postprocess the files
for i in "$FISHDIR"/doc_src/*.txt; do
+ # It would be nice to use -i here for edit in place, but that is not portable
CMD_NAME=`basename "$i" .txt`;
- sed -i '' -e "s/\(.\)\\.SH/\1/" -e "s/$CMD_NAME *\\\\- *\"\(.*\)\"/\1/" "${OUTPUTDIR}/man/man1/${CMD_NAME}.1"
+ sed -e "s/\(.\)\\.SH/\1/" -e "s/$CMD_NAME *\\\\- *\"\(.*\)\"/\1/" "${CMD_NAME}.1" > "${CMD_NAME}.1.tmp"
+ mv "${CMD_NAME}.1.tmp" "${CMD_NAME}.1"
done
fi