cd_echo
This commit is contained in:
parent
e745890b33
commit
b3adfe3182
1 changed files with 22 additions and 19 deletions
41
cd.sh
41
cd.sh
|
@ -33,6 +33,7 @@ cd_main () {
|
||||||
# functions
|
# functions
|
||||||
|
|
||||||
cd_set_environment () {
|
cd_set_environment () {
|
||||||
|
local variable
|
||||||
cd_step "Set environment"
|
cd_step "Set environment"
|
||||||
#
|
#
|
||||||
CD_CA_PACKAGE="ca-certificates"
|
CD_CA_PACKAGE="ca-certificates"
|
||||||
|
@ -42,12 +43,11 @@ cd_set_environment () {
|
||||||
#
|
#
|
||||||
case "${CD_OS_NAME}" in
|
case "${CD_OS_NAME}" in
|
||||||
"debian")
|
"debian")
|
||||||
CD_CA_ROOT="/usr/local/share/ca-certificates"
|
|
||||||
CD_PYTHON_PACKAGE="python3"
|
CD_PYTHON_PACKAGE="python3"
|
||||||
CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages"
|
CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages"
|
||||||
|
CD_CA_ROOT="/usr/local/share/ca-certificates"
|
||||||
;;
|
;;
|
||||||
"alma")
|
"alma")
|
||||||
CD_CA_ROOT="/etc/pki/ca-trust/source/anchors"
|
|
||||||
case "${CD_OS_VERSION}" in
|
case "${CD_OS_VERSION}" in
|
||||||
"8"|"9")
|
"8"|"9")
|
||||||
CD_PYTHON_PACKAGE="python3.11"
|
CD_PYTHON_PACKAGE="python3.11"
|
||||||
|
@ -55,6 +55,7 @@ cd_set_environment () {
|
||||||
;;
|
;;
|
||||||
*) cd_error_os "CD_OS_VERSION=${CD_OS_VERSION}" ;;
|
*) cd_error_os "CD_OS_VERSION=${CD_OS_VERSION}" ;;
|
||||||
esac
|
esac
|
||||||
|
CD_CA_ROOT="/etc/pki/ca-trust/source/anchors"
|
||||||
;;
|
;;
|
||||||
*) cd_error_os "CD_OS_NAME=${CD_OS_NAME}" ;;
|
*) cd_error_os "CD_OS_NAME=${CD_OS_NAME}" ;;
|
||||||
esac
|
esac
|
||||||
|
@ -83,23 +84,16 @@ cd_set_environment () {
|
||||||
CD_PROJECTS_URL="${CD_SERVER_URL}/${CD_PROJECTS_GROUP}"
|
CD_PROJECTS_URL="${CD_SERVER_URL}/${CD_PROJECTS_GROUP}"
|
||||||
CD_PROJECT_URL="${CD_PROJECTS_URL}/${CD_PROJECT_NAME}"
|
CD_PROJECT_URL="${CD_PROJECTS_URL}/${CD_PROJECT_NAME}"
|
||||||
#
|
#
|
||||||
echo -n "\
|
cd_echo "CD_OS_NAME" "CD_OS_VERSION"
|
||||||
CD_OS_NAME=${CD_OS_NAME}
|
cd_split
|
||||||
CD_OS_VERSION=${CD_OS_VERSION}
|
cd_echo "CD_DNS_FILE"
|
||||||
#
|
cd_split
|
||||||
CD_DNS_FILE=${CD_DNS_FILE}
|
cd_echo "CD_PYTHON_PACKAGE" "CD_PYTHON_PACKAGES" "CD_CA_ROOT"
|
||||||
#
|
cd_split
|
||||||
CD_PYTHON_COMMAND=${CD_PYTHON_COMMAND}
|
cd_echo "CD_SERVER_URL" \
|
||||||
CD_PYTHON_PACKAGES=${CD_PYTHON_PACKAGES}
|
"CD_PROJECTS_GROUP" "CD_PROJECT_NAME" "CD_PROJECT_BRANCH"
|
||||||
#
|
cd_split
|
||||||
CD_SERVER_URL=${CD_SERVER_URL}
|
cd_echo "CD_PROJECTS_URL" "CD_PROJECT_URL"
|
||||||
CD_PROJECTS_GROUP=${CD_PROJECTS_GROUP}
|
|
||||||
CD_PROJECT_NAME=${CD_PROJECT_NAME}
|
|
||||||
CD_PROJECT_BRANCH=${CD_PROJECT_BRANCH}
|
|
||||||
#
|
|
||||||
CD_PROJECTS_URL=${CD_PROJECTS_URL}
|
|
||||||
CD_PROJECT_URL=${CD_PROJECT_URL}
|
|
||||||
"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_set_dns_resolving () {
|
cd_set_dns_resolving () {
|
||||||
|
@ -302,6 +296,15 @@ cd_cat () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cd_echo () {
|
||||||
|
local name
|
||||||
|
if [ "${1}" ] ; then
|
||||||
|
for name in "${@}" ; do
|
||||||
|
eval "echo ${name}=\${${name}}"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
cd_error_ci () {
|
cd_error_ci () {
|
||||||
echo "× CI: ${1}"
|
echo "× CI: ${1}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue