Add development-scripts agent skill
Ports generic-scripts-module-v1 into a routed skill: module anatomy, shared loggers/base modules, Taskfile integration, workflows, and pattern decisions. Fixes a latent defect in the loggers example that silenced all logging in the module scaffold: loggers/lib/--index-api.sh now sources --env-vars-reader.sh, and the reader preserves already-exported values so caller overrides still win. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# IBM Confidential
|
||||
# 6949-70F, 6949-80D
|
||||
# © Copyright IBM Corp. 2018, 2024
|
||||
# US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/loggers/lib/--index-api.sh
|
||||
|
||||
_base_ensure_evnVarValue() {
|
||||
local FUNCTION_NAME="_base_ensure_evnVarValue"
|
||||
_loggers_debug "${FUNCTION_NAME}"
|
||||
|
||||
while
|
||||
true
|
||||
do
|
||||
if
|
||||
[ ! -z "${ENV_VAR_VALUE}" ]
|
||||
then
|
||||
break
|
||||
fi
|
||||
_loggers_emptyLine
|
||||
read -rep $'Provide environment variable value! \n> ' TMP_ENV_VAR_VALUE
|
||||
if
|
||||
[ -z "${TMP_ENV_VAR_VALUE}" ]
|
||||
then
|
||||
_loggers_errorX "${FUNCTION_NAME}" "Provided environment variable value can not be empty!"
|
||||
else
|
||||
export ENV_VAR_VALUE="${TMP_ENV_VAR_VALUE}"
|
||||
fi
|
||||
_loggers_emptyLine
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user