Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiled installRequirements using go compiler
Browse files Browse the repository at this point in the history
fchastanet committed Aug 23, 2024
1 parent 05bd353 commit 29ee12a
Showing 15 changed files with 1,510 additions and 1,381 deletions.
12 changes: 0 additions & 12 deletions bin/awkLint
Original file line number Diff line number Diff line change
@@ -337,17 +337,6 @@ Compiler::Embed::extractFileFromBase64() {
}


# @description ensure COMMAND_BIN_DIR env var is set
# and PATH correctly prepared
# @noargs
# @set COMMAND_BIN_DIR string the directory where to find this command
# @set PATH string add directory where to find this command binary
Compiler::Facade::requireCommandBinDir() {
COMMAND_BIN_DIR="${CURRENT_DIR}"
Env::pathPrepend "${COMMAND_BIN_DIR}"
}


# @description prepend directories to the PATH environment variable
# @arg $@ args:String[] list of directories to prepend
# @set PATH update PATH with the directories prepended
@@ -797,7 +786,6 @@ beforeParseCallback() {
Env::requireLoad
UI::requireTheme
Log::requireLoad
Compiler::Facade::requireCommandBinDir
}

copyrightCallback() {
39 changes: 7 additions & 32 deletions bin/definitionLint
Original file line number Diff line number Diff line change
@@ -284,30 +284,6 @@ Assert::tty() {
}


# @description ensure COMMAND_BIN_DIR env var is set
# and PATH correctly prepared
# @noargs
# @set COMMAND_BIN_DIR string the directory where to find this command
# @set PATH string add directory where to find this command binary
Compiler::Facade::requireCommandBinDir() {
COMMAND_BIN_DIR="${CURRENT_DIR}"
Env::pathPrepend "${COMMAND_BIN_DIR}"
}


# @description prepend directories to the PATH environment variable
# @arg $@ args:String[] list of directories to prepend
# @set PATH update PATH with the directories prepended
Env::pathPrepend() {
local arg
for arg in "$@"; do
if [[ -d "${arg}" && ":${PATH}:" != *":${arg}:"* ]]; then
PATH="$(realpath "${arg}"):${PATH}"
fi
done
}


# @description ensure env files are loaded
# @arg $@ list of default files to load at the end
# @exitcode 1 if one of env files fails to load
@@ -939,7 +915,6 @@ beforeParseCallback() {
Env::requireLoad
UI::requireTheme
Log::requireLoad
Compiler::Facade::requireCommandBinDir
}

copyrightCallback() {
@@ -1209,10 +1184,6 @@ declare optionFormat="plain"
declare optionFormatDefault="plain"
declare optionFormatAuthorizedValues="plain|checkstyle"

Env::requireLoad
UI::requireTheme
Log::requireLoad

optionHelpCallback() {
definitionLintCommandHelp
exit 0
@@ -1818,7 +1789,8 @@ definitionLintCommandHelp() {
echo
echo -e "${__HELP_TITLE_COLOR}DESCRIPTION:${__RESET_COLOR}"
declare -a definitionLintCommandLongDescription=(
"for each definition file:"
"\\nFor each definition file:"
""
"- check that all mandatory methods are existing"
" installScripts_<fileName>_helpDescription"
" installScripts_<fileName>_helpVariables"
@@ -1829,12 +1801,13 @@ definitionLintCommandHelp() {
" installScripts_<fileName>_dependencies"
" installScripts_<fileName>_breakOnConfigFailure"
" installScripts_<fileName>_breakOnTestFailure"
" installScripts_<fileName>_install"
" installScripts_<fileName>_configure"
" installScripts_<fileName>_install\\n installScripts_<fileName>_configure"
" installScripts_<fileName>_test"
""
"- check if other definitions files functions are defined by currently"
" linted definition file it would mean that another file has defined"
" the same methods"
""
"- check if each dependency exists"
""
"INTERNAL"
@@ -1872,6 +1845,8 @@ definitionLintCommandHelp() {
}


beforeParseCallback

definitionLintCommandParse "$@"
MAIN_FUNCTION_NAME="main"
main() {
14 changes: 2 additions & 12 deletions bin/doc
Original file line number Diff line number Diff line change
@@ -357,17 +357,6 @@ Compiler::Embed::extractFileFromBase64() {
}


# @description ensure COMMAND_BIN_DIR env var is set
# and PATH correctly prepared
# @noargs
# @set COMMAND_BIN_DIR string the directory where to find this command
# @set PATH string add directory where to find this command binary
Compiler::Facade::requireCommandBinDir() {
COMMAND_BIN_DIR="${CURRENT_DIR}"
Env::pathPrepend "${COMMAND_BIN_DIR}"
}


# @description prepend directories to the PATH environment variable
# @arg $@ args:String[] list of directories to prepend
# @set PATH update PATH with the directories prepended
@@ -1626,7 +1615,6 @@ beforeParseCallback() {
Env::requireLoad
UI::requireTheme
Log::requireLoad
Compiler::Facade::requireCommandBinDir
}

copyrightCallback() {
@@ -2463,6 +2451,8 @@ docCommandParse "$@"
MAIN_FUNCTION_NAME="main"
main() {

COMMAND_BIN_DIR="${FRAMEWORK_ROOT_DIR}/bin"

runContainer() {
local image="scrasnups/build:bash-tools-ubuntu-5.3"
local -a dockerRunCmd=(
25 changes: 0 additions & 25 deletions bin/dockerLint
Original file line number Diff line number Diff line change
@@ -338,30 +338,6 @@ Bash::handlePipelineFailure() {
}


# @description ensure COMMAND_BIN_DIR env var is set
# and PATH correctly prepared
# @noargs
# @set COMMAND_BIN_DIR string the directory where to find this command
# @set PATH string add directory where to find this command binary
Compiler::Facade::requireCommandBinDir() {
COMMAND_BIN_DIR="${CURRENT_DIR}"
Env::pathPrepend "${COMMAND_BIN_DIR}"
}


# @description prepend directories to the PATH environment variable
# @arg $@ args:String[] list of directories to prepend
# @set PATH update PATH with the directories prepended
Env::pathPrepend() {
local arg
for arg in "$@"; do
if [[ -d "${arg}" && ":${PATH}:" != *":${arg}:"* ]]; then
PATH="$(realpath "${arg}"):${PATH}"
fi
done
}


# @description ensure env files are loaded
# @arg $@ list of default files to load at the end
# @exitcode 1 if one of env files fails to load
@@ -1188,7 +1164,6 @@ beforeParseCallback() {
Env::requireLoad
UI::requireTheme
Log::requireLoad
Compiler::Facade::requireCommandBinDir
}

copyrightCallback() {
25 changes: 0 additions & 25 deletions bin/findShebangFiles
Original file line number Diff line number Diff line change
@@ -299,30 +299,6 @@ Assert::tty() {
}


# @description ensure COMMAND_BIN_DIR env var is set
# and PATH correctly prepared
# @noargs
# @set COMMAND_BIN_DIR string the directory where to find this command
# @set PATH string add directory where to find this command binary
Compiler::Facade::requireCommandBinDir() {
COMMAND_BIN_DIR="${CURRENT_DIR}"
Env::pathPrepend "${COMMAND_BIN_DIR}"
}


# @description prepend directories to the PATH environment variable
# @arg $@ args:String[] list of directories to prepend
# @set PATH update PATH with the directories prepended
Env::pathPrepend() {
local arg
for arg in "$@"; do
if [[ -d "${arg}" && ":${PATH}:" != *":${arg}:"* ]]; then
PATH="$(realpath "${arg}"):${PATH}"
fi
done
}


# @description ensure env files are loaded
# @arg $@ list of default files to load at the end
# @exitcode 1 if one of env files fails to load
@@ -781,7 +757,6 @@ beforeParseCallback() {
Env::requireLoad
UI::requireTheme
Log::requireLoad
Compiler::Facade::requireCommandBinDir
}

copyrightCallback() {
26 changes: 0 additions & 26 deletions bin/frameworkLint
Original file line number Diff line number Diff line change
@@ -310,17 +310,6 @@ Assert::tty() {
}


# @description ensure COMMAND_BIN_DIR env var is set
# and PATH correctly prepared
# @noargs
# @set COMMAND_BIN_DIR string the directory where to find this command
# @set PATH string add directory where to find this command binary
Compiler::Facade::requireCommandBinDir() {
COMMAND_BIN_DIR="${CURRENT_DIR}"
Env::pathPrepend "${COMMAND_BIN_DIR}"
}


# @description return the path of the function found in srcDirs
# @arg $1 functionName:String function name (eg: Functions::myFunction)
# @arg $@ srcDirs:String[] rest of args list of src directories in # which the function will be searched
@@ -355,19 +344,6 @@ Compiler::findFunctionInSrcDirs() {
}


# @description prepend directories to the PATH environment variable
# @arg $@ args:String[] list of directories to prepend
# @set PATH update PATH with the directories prepended
Env::pathPrepend() {
local arg
for arg in "$@"; do
if [[ -d "${arg}" && ":${PATH}:" != *":${arg}:"* ]]; then
PATH="$(realpath "${arg}"):${PATH}"
fi
done
}


# @description ensure env files are loaded
# @arg $@ list of default files to load at the end
# @exitcode 1 if one of env files fails to load
@@ -916,7 +892,6 @@ beforeParseCallback() {
Env::requireLoad
UI::requireTheme
Log::requireLoad
Compiler::Facade::requireCommandBinDir
}

copyrightCallback() {
@@ -1191,7 +1166,6 @@ beforeParseCallback() {
Env::requireLoad
UI::requireTheme
Log::requireLoad
Compiler::Facade::requireCommandBinDir
}
optionExpectedWarningsCountCallback() {
if [[ ! "$2" =~ ^[0-9]+$ ]] || (($2 < 0)); then
Loading

0 comments on commit 29ee12a

Please sign in to comment.