File: 0002_fix_api_docs_generation.patch

package info (click to toggle)
mongo-cxx-driver 4.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 14,632 kB
  • sloc: cpp: 60,864; python: 962; sh: 496; xml: 253; perl: 94; makefile: 22
file content (30 lines) | stat: -rw-r--r-- 1,078 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Description: apidocs: relocate over-eager command checks into conditional branch
Origin: https://github.com/mongodb/mongo-cxx-driver/pull/1478

diff --git a/etc/generate-latest-apidocs.sh b/etc/generate-latest-apidocs.sh
index da0fe98780..bd000a7564 100755
--- a/etc/generate-latest-apidocs.sh
+++ b/etc/generate-latest-apidocs.sh
@@ -22,10 +22,6 @@ DOXYGEN_VERSION_REQUIRED="1.13.2"
 # Permit using any Doxygen version.
 : "${DOXYGEN_ANY_VERSION:=0}"
 
-command -v git >/dev/null
-command -v mktemp >/dev/null
-command -v sed >/dev/null
-
 if [[ ! -d build ]]; then
   echo "missing build directory: this script must be run from the project root directory" 1>&2
   exit 1
@@ -50,6 +46,11 @@ if [[ "${DOXYGEN_USE_CURRENT:?}" == 1 ]]; then
   output_directory="${apidocspath:?}/current"
   scratch_dir="$(pwd)"
 else
+  Check required tools exist.
+  command -V git >/dev/null
+  command -V mktemp >/dev/null
+  command -V sed >/dev/null
+
   # Use a clean copy of the repository.
   output_directory="${apidocspath:?}/mongocxx-${LATEST_VERSION:?}"
   scratch_dir="$(mktemp -d)"