diff --git a/build_docs/linuxdocs.sh b/build_docs/linuxdocs.sh index 7ea6e4c..bac13b5 100755 --- a/build_docs/linuxdocs.sh +++ b/build_docs/linuxdocs.sh @@ -150,8 +150,17 @@ all_types="main antora cppalv1" cppalv1_types="not_currently_used skipping_this" if [ -z "$typeoption" ]; then - if [ -f "$BOOST_SRC_FOLDER/doc/build_antora.sh" ]; then - typeoption="antora" + # if [ -f "$BOOST_SRC_FOLDER/doc/build_antora.sh" ]; then + # if ls -1 "$BOOST_SRC_FOLDER/doc/" | grep -i antora > /dev/null; then + if find "$BOOST_SRC_FOLDER/doc/" -maxdepth 1 -name '*antora*' | grep . ; then + if [ -f "$BOOST_SRC_FOLDER/doc/Jamfile" ] || [ -f "$BOOST_SRC_FOLDER/doc/jamfile" ] || [ -f "$BOOST_SRC_FOLDER/doc/Jamfile.v2" ] || [ -f "$BOOST_SRC_FOLDER/doc/jamfile.v2" ] || [ -f "$BOOST_SRC_FOLDER/doc/Jamfile.v3" ] || [ -f "$BOOST_SRC_FOLDER/doc/jamfile.v3" ] || [ -f "$BOOST_SRC_FOLDER/doc/Jamfile.jam" ] || [ -f "$BOOST_SRC_FOLDER/doc/jamfile.jam" ] || [ -f "$BOOST_SRC_FOLDER/doc/build.jam" ] ; then + echo "doc/build_antora.sh or another doc/antora file exists however there is also a Jamfile. Ambiguous result. For the moment, prefer the Jamfile. Proceeding." + install_antora_deps="yes" + typeoption="main" + else + echo "build_antora.sh exists. Setting build type to antora." + typeoption="antora" + fi elif [[ " $cppalv1_types " =~ .*\ $REPONAME\ .* ]]; then # not used currently, but an example typeoption="cppalv1" @@ -181,7 +190,7 @@ if [ "$skippackagesoption" != "yes" ]; then sudo apt-get install -y build-essential cmake curl default-jre-headless python3 python3-venv rsync unzip wget - if [ "$typeoption" = "antora" ]; then + if [ "$typeoption" = "antora" ] || [ "$install_antora_deps" = "yes" ]; then mkdir -p ~/.nvm_${REPONAME}_antora export NODE_VERSION=18.18.1 diff --git a/build_docs/macosdocs.sh b/build_docs/macosdocs.sh index ad53e16..abab10a 100755 --- a/build_docs/macosdocs.sh +++ b/build_docs/macosdocs.sh @@ -172,8 +172,17 @@ all_types="main antora cppalv1" cppalv1_types="not_currently_used skipping_this" if [ -z "$typeoption" ]; then - if [ -f "$BOOST_SRC_FOLDER/doc/build_antora.sh" ]; then - typeoption="antora" + # if [ -f "$BOOST_SRC_FOLDER/doc/build_antora.sh" ]; then + # if ls -1 "$BOOST_SRC_FOLDER/doc/" | grep -i antora > /dev/null; then + if find "$BOOST_SRC_FOLDER/doc/" -maxdepth 1 -name '*antora*' | grep . ; then + if [ -f "$BOOST_SRC_FOLDER/doc/Jamfile" ] || [ -f "$BOOST_SRC_FOLDER/doc/jamfile" ] || [ -f "$BOOST_SRC_FOLDER/doc/Jamfile.v2" ] || [ -f "$BOOST_SRC_FOLDER/doc/jamfile.v2" ] || [ -f "$BOOST_SRC_FOLDER/doc/Jamfile.v3" ] || [ -f "$BOOST_SRC_FOLDER/doc/jamfile.v3" ] || [ -f "$BOOST_SRC_FOLDER/doc/Jamfile.jam" ] || [ -f "$BOOST_SRC_FOLDER/doc/jamfile.jam" ] || [ -f "$BOOST_SRC_FOLDER/doc/build.jam" ] ; then + echo "doc/build_antora.sh or another doc/antora file exists however there is also a Jamfile. Ambiguous result. For the moment, prefer the Jamfile. Proceeding." + install_antora_deps="yes" + typeoption="main" + else + echo "build_antora.sh exists. Setting build type to antora." + typeoption="antora" + fi elif [[ " $cppalv1_types " =~ .*\ $REPONAME\ .* ]]; then # not used currently, but an example typeoption="cppalv1" @@ -197,7 +206,7 @@ echo '==================================> INSTALL' if [ "$skippackagesoption" != "yes" ]; then - if [ "$typeoption" = "antora" ]; then + if [ "$typeoption" = "antora" ] || [ "$install_antora_deps" = "yes" ]; then mkdir -p ~/.nvm_${REPONAME}_antora export NODE_VERSION=18.18.1 # The container has a pre-installed nodejs. Overwrite those again. diff --git a/build_docs/windowsdocs.ps1 b/build_docs/windowsdocs.ps1 index 880566d..18ddc5d 100755 --- a/build_docs/windowsdocs.ps1 +++ b/build_docs/windowsdocs.ps1 @@ -220,8 +220,17 @@ $cppalv1_types="not_currently_used skipping_this" if (! $typeoption ) { - if (Test-Path "$BOOST_SRC_FOLDER\doc\build_antora.sh") { - $typeoption="antora" + # if (Test-Path "$BOOST_SRC_FOLDER\doc\build_antora.sh") { + if ( Get-ChildItem -Path "$BOOST_SRC_FOLDER\doc\" "*antora*" ) { + if ( (Test-Path -Path $BOOST_SRC_FOLDER/doc/Jamfile) -or (Test-Path -Path $BOOST_SRC_FOLDER/doc/Jamfile.v2) -or (Test-Path -Path $BOOST_SRC_FOLDER/doc/Jamfile.v3) -or (Test-Path -Path $BOOST_SRC_FOLDER/doc/Jamfile.jam) -or (Test-Path -Path $BOOST_SRC_FOLDER/doc/build.jam)) { + Write-Output "doc/build_antora.sh or another doc/antora file exists however there is also a Jamfile. Ambiguous result. For the moment, prefer the Jamfile. Proceeding." + $install_antora_deps="yes" + $typeoption="main" + } + else { + Write-Output "build_antora.sh exists. Setting build type to antora." + $typeoption="antora" + } } elseif ($cppalv1_types.contains($REPONAME)) { $typeoption="cppalv1" @@ -296,7 +305,7 @@ if ( -Not ${skip-packages} ) { refenv - if ($typeoption -eq "antora") { + if (($typeoption -eq "antora") -or ($install_antora_deps -eq "yes")) { if ( -Not (Get-Command clang++ -errorAction SilentlyContinue) ) { @@ -787,5 +796,5 @@ else { } Pop-Location -echo "At the end of $scriptname" +Write-Output "At the end of $scriptname" exit 0