56 строки
1.6 KiB
Bash
Исполняемый файл
56 строки
1.6 KiB
Bash
Исполняемый файл
#! /bin/sh
|
|
|
|
# Forget portability - this is a script for maintainers only.
|
|
# In fact, it's only known to run on RedHat Linux 7.1.
|
|
# HTML files are included with the distribution, so it's not a big deal.
|
|
|
|
# Exit on errors.
|
|
set -e
|
|
|
|
# Big fat warning in case we need it
|
|
WARNING='
|
|
|
|
Could not generate GMC documentation.
|
|
Due to installations of DocBook being very different across platforms
|
|
and distributions, this "mkhtml" script has been designed to run on
|
|
RedHat Linux 7.1 only. You may want to adopt it to your system if you
|
|
have DocBook 4.1 installed.
|
|
|
|
Please DO NOT make official releases of GNU Midnight Commander on the
|
|
systems where the GMC documentation fails to be generated.
|
|
|
|
'
|
|
|
|
# Trap if something goes wrong
|
|
for signal in 0 1 2 13 15; do
|
|
trap 'status=$?
|
|
set +e
|
|
trap 0
|
|
test $status = 0 || echo "$WARNING"
|
|
exit $status' $signal
|
|
done
|
|
|
|
# Some cleanup
|
|
rm -rf gmc gmc.junk
|
|
|
|
# Complicated bootstrap process - create empty genindex.sgml first,
|
|
# then generate it and then html files again.
|
|
echo >genindex.sgml
|
|
|
|
# Java wrapper doesn't seem to have any sane way for passing extra options
|
|
# to the jade command. It doesn't honor the environment variables either.
|
|
# Fortunately, there is an undocumented "-l" option (perhaps intended for
|
|
# something else).
|
|
jw -l "-V html-index=1" -f docbook -b html -o gmc gmc.sgml
|
|
|
|
# collateindex.pl may not have /usr/bin/perl on the first line.
|
|
perl /usr/bin/collateindex.pl gmc/HTML.index >genindex.sgml
|
|
|
|
# Now process all with the right genindex.sgml
|
|
rm -rf gmc
|
|
jw -f docbook -b html -o gmc gmc.sgml
|
|
|
|
# Move the output to the current directory
|
|
mv gmc/* .
|
|
rm -rf gmc
|