Cleanup updatedocs.sh

This commit is contained in:
Robin Johnson
2003-06-22 20:21:11 +00:00
parent 0706feb397
commit 8f26e1b4f7

View File

@@ -8,12 +8,19 @@ SRC=Documentation.html
DST=Documentation.txt DST=Documentation.txt
OPTIONS="--dont_wrap_pre --nolist --dump" OPTIONS="--dont_wrap_pre --nolist --dump"
CMD=lynx CMD=lynx
if [ ! -e "$SRC" ]; then
if [ -e ../"$SRC" ]; then TMPDOCDIRS=".. . `pwd` `pwd`/`dirname ${0}`/.. `dirname ${0}`/.."
SRC="../$SRC" for dir in ${TMPDOCDIRS}; do
else [ -e "${dir}/${SRC}" ] && DOCDIR="${dir}"
[ -n "${DOCDIR}" ] && break
done
unset TMPDOCDIRS
if [ -z "${DOCDIR}" ]; then
echo 'Unable to locate documentation!' echo 'Unable to locate documentation!'
return exit -1
fi; fi
fi;
$CMD $OPTIONS "$SRC" > "$DST" SRC="${DOCDIR}/${SRC}"
DST="${DOCDIR}/${DST}"
${CMD} ${OPTIONS} "${SRC}" > "${DST}"