echo"---> ! Could not find doxygen tex source $REFMAN_TEXFILE. Leaving tarball creation."
exit 1;
fi
#to resolve all references, pdf and bibtex have to be run more than once. With 4 runs, we should get everything right.
PDFRUNS=4
echo"---> Build Doxygen PDF reference"
if["$DO_CREATE_LATEXDOC"=true];then
cd"$MYTMPDIR_DOXY_BUILD/latex"
for((i=1; i<=$PDFRUNS; i++));do
echo"----> LaTeX Run ($i/$PDFRUNS)"
redirect_cmd pdflatex refman.tex
redirect_cmd bibtex refman
done
fi
MYTMPDIR=`mktemp -d`
echo"Using temporary directory $MYTMPDIR"
cd"$REMEMBER_CUR_DIR"
trap"rm -rf $MYTMPDIR" EXIT
echo"--> Calling rsync to temporary folder 1/2 ($MYTMPDIR)"
echo"Calling rsync to temporary folder"
#this is the rsync, to the folder from which the tarball will be created later. Exclude everything, that should not be in the tarball. Also exclude things, that are generated somewhere else, like examples.
rsync \
redirect_cmd rsync \
--exclude".git"\
--exclude".git"\
--exclude".gitignore"\
--exclude".gitignore"\
--exclude"build*/"\
--exclude".gitattributes"\
--exclude"scripts/*.tar.gz"\
--exclude"build*/"\
--exclude"scripts/cpplint.py"\
--exclude"scripts/*.tar.gz"\
--exclude"scripts/create_tarball.sh"\
--exclude"scripts/cpplint.py"\
--exclude"scripts/insert_license.sh"\
--exclude"scripts/create_tarball.sh"\
--exclude"scripts/license.*"\
--exclude"scripts/insert_license.sh"\
--exclude"scripts/license_*"\
--exclude"scripts/license.*"\
--exclude"scripts/remove_license.sh"\
--exclude"scripts/license_*"\
--exclude"mtapi/MTAPI.mm"\
--exclude"scripts/remove_license.sh"\
--exclude".cproject"\
--exclude"mtapi/MTAPI.mm"\
--exclude".gitattributes"\
--exclude".cproject"\
--exclude".project"\
--exclude".gitattributes"\
--exclude"*.blg"\
--exclude".project"\
--exclude"*.fls"\
--exclude"*.blg"\
--exclude"*.bbl"\
--exclude"*.fls"\
--exclude"*.fdb_latexmk"\
--exclude"*.bbl"\
--exclude"*.log"\
--exclude"*.fdb_latexmk"\
--exclude"*.out"\
--exclude"*.log"\
--exclude"*.toc"\
--exclude"*.out"\
--exclude"*.aux"\
--exclude"*.toc"\
--exclude"doc/tutorial/sty"\
--exclude"*.aux"\
--exclude"doc/tutorial/pics"\
--exclude"doc/tutorial/sty"\
--exclude"doc/tutorial/content"\
--exclude"doc/tutorial/pics"\
--exclude"doc/tutorial/*.tex"\
--exclude"doc/tutorial/content"\
--exclude"doc/tutorial/*.bib"\
--exclude"doc/tutorial/*.tex"\
--exclude"doc/reference/*.xml"\
--exclude"doc/tutorial/*.bib"\
--exclude"doc/reference/*.dox"\
--exclude"doc/reference/*.xml"\
--exclude"doc/reference/*.in"\
--exclude"doc/reference/*.dox"\
--exclude"doc/reference/header.html"\
--exclude"doc/reference/*.in"\
--exclude"doc/reference/*.css"\
--exclude"doc/reference/header.html"\
--exclude"doc/examples/insert_snippets.py"\
--exclude"doc/reference/*.css"\
--exclude".travis.yml"\
--exclude"doc/examples"\
--archive--recursive${d}$MYTMPDIR/${n}
--exclude"doc/examples/insert_snippets.py"\
--exclude".travis.yml"\
echo"Replace version number in README"
--archive--recursive${d}$MYTMPDIR/${n}
echo"--> Replace version number in README"
README_FILE="$MYTMPDIR/${n}/README.md"
README_FILE="$MYTMPDIR/${n}/README.md"
#replace version number in readme
if[-f$README_FILE];then
if[-f$README_FILE];then
sed -i"s/\[VERSION_NUMBER_TEMPLATE\]/$VERSION_NUMBER/g"$README_FILE
sed -i"s/\[VERSION_NUMBER_TEMPLATE\]/$VERSION_NUMBER/g"$README_FILE
fi
fi
echo"Checking line endings"
echo"--> Calling rsync to temporary folder 2/2 ($MYTMPDIR_BUILD)"
#doing a rsync to another temporary folder, which will be used to build things, like e.g. the tutorial pdf.