Skip to content

Commit

Permalink
fix bin/doc
Browse files Browse the repository at this point in the history
  • Loading branch information
fchastanet committed Nov 12, 2023
1 parent 22d2b92 commit 7425c9c
Show file tree
Hide file tree
Showing 22 changed files with 105 additions and 784 deletions.
2 changes: 2 additions & 0 deletions .cspell/bash.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,5 @@ hlocalhost
uuser
ppassword
DELIMS
Facadesh
Scriptsh
6 changes: 5 additions & 1 deletion bin/cli
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ interruptManagement() {
trap interruptManagement INT
SCRIPT_NAME=${0##*/}
REAL_SCRIPT_FILE="$(readlink -e "$(realpath "${BASH_SOURCE[0]}")")"
CURRENT_DIR="$(cd "$(readlink -e "${REAL_SCRIPT_FILE%/*}")" && pwd -P)"
if [[ -n "${EMBED_CURRENT_DIR}" ]]; then
CURRENT_DIR="${EMBED_CURRENT_DIR}"
else
CURRENT_DIR="$(cd "$(readlink -e "${REAL_SCRIPT_FILE%/*}")" && pwd -P)"
fi

################################################
# Temp dir management
Expand Down
6 changes: 5 additions & 1 deletion bin/dbImport
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ interruptManagement() {
trap interruptManagement INT
SCRIPT_NAME=${0##*/}
REAL_SCRIPT_FILE="$(readlink -e "$(realpath "${BASH_SOURCE[0]}")")"
CURRENT_DIR="$(cd "$(readlink -e "${REAL_SCRIPT_FILE%/*}")" && pwd -P)"
if [[ -n "${EMBED_CURRENT_DIR}" ]]; then
CURRENT_DIR="${EMBED_CURRENT_DIR}"
else
CURRENT_DIR="$(cd "$(readlink -e "${REAL_SCRIPT_FILE%/*}")" && pwd -P)"
fi

################################################
# Temp dir management
Expand Down
6 changes: 5 additions & 1 deletion bin/dbImportProfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ interruptManagement() {
trap interruptManagement INT
SCRIPT_NAME=${0##*/}
REAL_SCRIPT_FILE="$(readlink -e "$(realpath "${BASH_SOURCE[0]}")")"
CURRENT_DIR="$(cd "$(readlink -e "${REAL_SCRIPT_FILE%/*}")" && pwd -P)"
if [[ -n "${EMBED_CURRENT_DIR}" ]]; then
CURRENT_DIR="${EMBED_CURRENT_DIR}"
else
CURRENT_DIR="$(cd "$(readlink -e "${REAL_SCRIPT_FILE%/*}")" && pwd -P)"
fi

################################################
# Temp dir management
Expand Down
6 changes: 5 additions & 1 deletion bin/dbImportStream
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ interruptManagement() {
trap interruptManagement INT
SCRIPT_NAME=${0##*/}
REAL_SCRIPT_FILE="$(readlink -e "$(realpath "${BASH_SOURCE[0]}")")"
CURRENT_DIR="$(cd "$(readlink -e "${REAL_SCRIPT_FILE%/*}")" && pwd -P)"
if [[ -n "${EMBED_CURRENT_DIR}" ]]; then
CURRENT_DIR="${EMBED_CURRENT_DIR}"
else
CURRENT_DIR="$(cd "$(readlink -e "${REAL_SCRIPT_FILE%/*}")" && pwd -P)"
fi

################################################
# Temp dir management
Expand Down
10 changes: 7 additions & 3 deletions bin/dbQueryAllDatabases

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions bin/dbScriptAllDatabases

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions bin/doc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ interruptManagement() {
trap interruptManagement INT
SCRIPT_NAME=${0##*/}
REAL_SCRIPT_FILE="$(readlink -e "$(realpath "${BASH_SOURCE[0]}")")"
CURRENT_DIR="$(cd "$(readlink -e "${REAL_SCRIPT_FILE%/*}")" && pwd -P)"
if [[ -n "${EMBED_CURRENT_DIR}" ]]; then
CURRENT_DIR="${EMBED_CURRENT_DIR}"
else
CURRENT_DIR="$(cd "$(readlink -e "${REAL_SCRIPT_FILE%/*}")" && pwd -P)"
fi

################################################
# Temp dir management
Expand Down Expand Up @@ -1636,10 +1640,13 @@ updateArgListTraceVerboseCallback() {
BASH_FRAMEWORK_ARGV_FILTERED+=(-vvv)
}

docCommand parse "${BASH_FRAMEWORK_ARGV[@]}"

run() {
if [[ "${IN_BASH_DOCKER:-}" != "You're in docker" ]]; then
DOCKER_RUN_OPTIONS=$"-e ORIGINAL_DOC_DIR=${DOC_DIR}" \
"${COMMAND_BIN_DIR}/runBuildContainer" "/bash/bin/doc" "${RUN_CONTAINER_ARGV_FILTERED[@]}"
"${COMMAND_BIN_DIR}/runBuildContainer" "/bash/bin/doc" \
"${RUN_CONTAINER_ARGV_FILTERED[@]}"
return $?
fi

Expand Down Expand Up @@ -1669,7 +1676,7 @@ run() {
ShellDoc::generateMdFileFromTemplate \
"${BASH_TOOLS_ROOT_DIR}/Commands.tmpl.md" \
"${DOC_DIR}/Commands.md" \
"${FRAMEWORK_BIN_DIR}" \
"${BASH_TOOLS_ROOT_DIR}/bin" \
TOKEN_NOT_FOUND_COUNT \
'(bash-tpl|plantuml|definitionLint|compile|installFacadeExample)$'

Expand Down
Loading

0 comments on commit 7425c9c

Please sign in to comment.