Skip to content

Commit a9a3c3d

Browse files
authored
apidocs: relocate over-eager command checks into conditional branch (#1478)
1 parent 70b2032 commit a9a3c3d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

etc/generate-latest-apidocs.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ DOXYGEN_VERSION_REQUIRED="1.14.0"
2222
# Permit using any Doxygen version.
2323
: "${DOXYGEN_ANY_VERSION:=0}"
2424

25-
command -v git >/dev/null
26-
command -v mktemp >/dev/null
27-
command -v sed >/dev/null
28-
2925
if [[ ! -d build ]]; then
3026
echo "missing build directory: this script must be run from the project root directory" 1>&2
3127
exit 1
@@ -50,6 +46,11 @@ if [[ "${DOXYGEN_USE_CURRENT:?}" == 1 ]]; then
5046
output_directory="${apidocspath:?}/current"
5147
scratch_dir="$(pwd)"
5248
else
49+
# Check required tools exist.
50+
command -V git >/dev/null
51+
command -V mktemp >/dev/null
52+
command -V sed >/dev/null
53+
5354
# Use a clean copy of the repository.
5455
output_directory="${apidocspath:?}/mongocxx-${LATEST_VERSION:?}"
5556
scratch_dir="$(mktemp -d)"

0 commit comments

Comments
 (0)