Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge branch 'dev/joergs/bareos-18.2/doc' into bareos-18.2
- Loading branch information
Showing
8 changed files
with
1,224 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 29 additions & 7 deletions
36
docs/manuals/en/new_main_reference/convert_all_tex_files_to_rst.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,47 @@ | ||
#!/bin/bash | ||
set -x | ||
|
||
#set -x | ||
|
||
ORIGIN_DIR="../main/" | ||
WORK_DIR="./build/" | ||
TARGET_DIR="./source/" | ||
|
||
for destfile in `cat destfiles.txt | grep -v ^#`; | ||
do | ||
PHASE=${1:-ALL} | ||
FILES=${2:-$(cat destfiles.txt | grep -v ^#)} | ||
|
||
for destfile in $FILES; do | ||
file=`echo $destfile | sed 's#.*/##g'` | ||
chapterdir=`echo $destfile | sed 's#/.*##g'` | ||
filebase=`basename $destfile .tex` | ||
|
||
mkdir -p ${WORK_DIR}${chapterdir} | ||
mkdir -p ${TARGET_DIR}${chapterdir} | ||
|
||
if [ "${chapterdir}" != "developers" ]; then | ||
|
||
./pre_conversion_changes.sh ${ORIGIN_DIR}${file} ${TARGET_DIR}${destfile}; | ||
if [ $PHASE == "ALL" ] || [ $PHASE == "prepandoc" ]; then | ||
printf "%-50s (%s)\n" "$destfile" "prepandoc" | ||
./pre_conversion_changes.sh ${ORIGIN_DIR}${file} ${WORK_DIR}${destfile} | ||
fi | ||
|
||
pandoc --verbose --columns=500 -f latex+raw_tex -t rst ${TARGET_DIR}${destfile} -o ${TARGET_DIR}${chapterdir}/${filebase}.rst || exit "could not convert file $file" | ||
if [ $PHASE == "ALL" ] || [ $PHASE == "pandoc" ]; then | ||
printf "%-50s (%s)\n" "$destfile" "pandoc" | ||
pandoc --verbose --columns=500 -f latex+raw_tex -t rst ${WORK_DIR}${destfile} -o ${WORK_DIR}${chapterdir}/${filebase}.rst || exit "could not convert file ${WORK_DIR}${destfile}" | ||
#pandoc --verbose --columns=500 -f latex+raw_tex -t rst --filter latex-scan.py ${TARGET_DIR}${destfile} -o ${TARGET_DIR}${chapterdir}/${filebase}.rst || exit "could not convert file $file" | ||
fi | ||
|
||
./post_conversion_changes.sh ${TARGET_DIR}${chapterdir}/${filebase}.rst | ||
if [ $PHASE == "ALL" ] || [ $PHASE == "postpandoc" ]; then | ||
printf "%-50s (%s)\n" "$destfile" "postpandoc" | ||
# ./post_conversion_changes.sh ${TARGET_DIR}${chapterdir}/${filebase}.rst | ||
printf "%s\n" ".. ATTENTION do not edit this file manually." > ${TARGET_DIR}${chapterdir}/${filebase}.rst | ||
printf "%s\n\n" " It was automatically converted from the corresponding .tex file" >> ${TARGET_DIR}${chapterdir}/${filebase}.rst | ||
cat ${WORK_DIR}${chapterdir}/${filebase}.rst | ./latex-scan.py --standalone >> ${TARGET_DIR}${chapterdir}/${filebase}.rst 2>${WORK_DIR}${chapterdir}/${filebase}.latex-scan.log || exit "failed to post convert ${WORK_DIR}${chapterdir}/${filebase}.rst" | ||
fi | ||
else | ||
# developers files are only copied over | ||
echo "not doing: cp ../developers/source/${file} ${TARGET_DIR}${chapterdir}" | ||
if [ $PHASE == "ALL" ]; then | ||
#cp ../developers/source/${file} ${TARGET_DIR}${chapterdir} | ||
echo "not doing: cp ../developers/source/${file} ${TARGET_DIR}${chapterdir}" | ||
fi | ||
fi | ||
done |
Oops, something went wrong.