message: prompt user once to cleanup build and install dir
diff: #!/bin/bash
  -# Run with argument `--clean` for clean build and removal of install directory.
  +# Run with argument `--skip-checks` to skip checks for clean build and removing install dir.
  # exit on any error
  set -e
  @@ -13,37 +13,20 @@ set -e
  # Get current directory of script.
  source_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  -help_msg="
  -Usage: ./generate_docs.sh [OPTIONS]
  -1. Builds and installs the source
  -2. Runs doxygen and create HTML and XML docs
  -3. Runs script to generate markdown from XML
  -
  - --clean for clean build and removal of install directory.
  - --help display this help and exit
  -"
  -
  -clean_build=false
  -if [ "$#" -eq 1 -a "$1" == "--clean" ]; then
  - clean_build=true
  -elif [ "$#" -eq 1 ]; then
  - echo "$help_msg"
  - if [ "$1" == "--help" ]; then
  - exit 0
  - else
  - exit 1
  - fi
  +skip_checks=false
  +if [ "$#" -eq 1 -a "$1" == "--skip-checks" ]; then
  + skip_checks=true
  fi
  # We use a local install folder so we don't need sudo.
  install_prefix="$source_dir/install"
  -if [ "$clean_build" = true ]; then
  +if [ "$skip_checks" = false ]; then
  # We need to do a clean build, otherwise the INSTALL_PREFIX has no effect.
  # Check for leftover install artefacts.
  if [ -e $source_dir/build/ ] || [ -e $install_prefix ] ; then
  - make clean
  - rm -rf $install_prefix
  + printf "Cleaup your build & install directory using below command.\nmake clean && rm -rf $install_prefix\n"
  + exit 1
  fi
  fi
  