+
+# To include the context-sensitive help, specify the directory
+# where the manual source is. This script will then call the "translate"
+# script there to build the manual, and copy it to the proper place
+# before the AppImage is built.
+
+CINGG_DIRECTORY=$(pwd)
+MANUAL_DIRECTORY=$(pwd)/../../cin-manual-latex
+
+# Build the manual if the directory is specified and exists, and copy it
+# to CinGG
+if [ -d "$MANUAL_DIRECTORY" ]; then
+ pushd $MANUAL_DIRECTORY
+ # run the build in a subshell so if some error causes an exit
+ # the popd will still work.
+ (./translate_manual) 2>&1 | tee $CINGG_DIRECTORY/manual.log
+ popd
+ rm -rf bin/doc/CinelerraGG_Manual
+ cp -r $MANUAL_DIRECTORY/CinelerraGG_Manual bin/doc/
+fi
+