| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function help_updateOutputFiles { |
| |
| |
| cli_printMessage "`gettext "Updating manual's output files"`" |
| |
| # -- .info ---------- |
| |
| # Check .info output directory |
| [[ ! -d ${MANUALS_DIR[3]} ]] && mkdir -p ${MANUALS_DIR[3]} |
| |
| # Update .info file |
| /usr/bin/makeinfo ${MANUALS_FILE[1]} --output=${MANUALS_FILE[4]} --no-ifhtml |
| |
| # Check .info file. If the info file was not created then there |
| # are errors to fix. |
| if [[ ! -f ${MANUALS_FILE[4]} ]];then |
| cli_printMessage "$(caller)" "AsToKnowMoreLine" |
| fi |
| |
| # Compress .info file. |
| bzip2 -f ${MANUALS_FILE[4]} |
| |
| # -- .html ---------- |
| |
| # Check html output directory |
| [[ ! -d ${MANUALS_DIR[4]} ]] && mkdir -p ${MANUALS_DIR[4]} |
| |
| # Add html output directory into directory stack to make it the |
| # working directory. If we don't do this, texi2html doesn't |
| # produce paths correctly inside html output. |
| pushd ${MANUALS_DIR[4]} > /dev/null |
| |
| # Update html files. At this point, we use texi2html to export |
| # texinfo files to html using Modern's CSS definitions. We also |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| texi2html ${MANUALS_FILE[1]} --output=${MANUALS_DIR[4]} --split section \ |
| --nosec-nav \ |
| --css-include=/home/centos/artwork/trunk/Identity/Models/Css/Texi2html/stylesheet.css \ |
| --I=/home/centos/artwork |
| |
| |
| sed -r -i \ |
| -f /home/centos/artwork/trunk/Identity/Models/Css/Texi2html/transformations.sed \ |
| ${MANUALS_DIR[4]}/*.html |
| |
| |
| popd > /dev/null |
| |
| |
| |
| |
| [[ ! -d ${MANUALS_DIR[5]} ]] && mkdir -p ${MANUALS_DIR[5]} |
| |
| |
| /usr/bin/makeinfo ${MANUALS_FILE[1]} --output=${MANUALS_FILE[5]} --plaintext --no-ifhtml |
| |
| |
| |
| help_addNewFilesToWorkingCopy ${MANUALS_DIR[0]} |
| if [[ $(svn diff ${MANUALS_DIR[0]}) != '' ]];then |
| cli_printMessage "`gettext "The working copy has been updated."`" |
| cli_printMessage "`gettext "Do you want to see changes now?"`" "AsYesOrNoRequestLine" |
| eval svn diff ${MANUALS_DIR[0]} | less |
| cli_printMessage "`gettext "Do you want to commit changes now?"`" "AsYesOrNoRequestLine" |
| eval svn commit ${MANUALS_DIR[0]} |
| fi |
| |
| } |