#!/usr/bin/env bash # ------------------------------------------------------------------------------ # Tidy source files in order to be compatible with Sphinx: # - rename image files with incompatible characters # # Examples: # ./tidy.sh # ./tidy.sh --debug # ------------------------------------------------------------------------------ PROJECT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" # shellcheck disable=SC1090 source "${PROJECT_DIR}/bin/shflags/shflags" # shellcheck disable=SC1090 source "${PROJECT_DIR}/bin/ansi/ansi" # shellcheck disable=SC1090 source "${PROJECT_DIR}/bin/ndd-log4b/ndd-log4b.sh" # shellcheck disable=SC1090 source "${PROJECT_DIR}/bin/ndd-utils4b/ndd-utils4b.sh" # shellcheck disable=SC1090 source "${PROJECT_DIR}/bin/variables.sh" # disable before shflags ndd::base::catch_more_errors_off DEFINE_boolean "debug" false "Enable debug mode" "d" read -r -d '' FLAGS_HELP <&1)" exit 1 } trap 'error_handler ${?}' ERR main "${@}" exit 0