Compare commits
No commits in common. "e3a9b871252c9ffefbc904d9349080011d745932" and "1b312228cc979d754b66eb8ea9c89665f79d5009" have entirely different histories.
e3a9b87125
...
1b312228cc
2 changed files with 156 additions and 151 deletions
12
readme.md
12
readme.md
|
@ -211,13 +211,10 @@ Handle project workflows in a unified way:
|
||||||
|
|
||||||
## When
|
## When
|
||||||
|
|
||||||
### Tasks for a 1st stable release
|
### Shell
|
||||||
|
|
||||||
#### Shell
|
|
||||||
|
|
||||||
* comment
|
* comment
|
||||||
* drawing characters constants
|
* drawing characters constants
|
||||||
* handle errors
|
|
||||||
* packages
|
* packages
|
||||||
* configure
|
* configure
|
||||||
* apk
|
* apk
|
||||||
|
@ -228,8 +225,9 @@ Handle project workflows in a unified way:
|
||||||
* codecs repository
|
* codecs repository
|
||||||
* disable & enable https
|
* disable & enable https
|
||||||
* test
|
* test
|
||||||
|
* underscore internals
|
||||||
|
|
||||||
#### Shell → Python
|
### Shell → Python
|
||||||
|
|
||||||
* check file & variable sums
|
* check file & variable sums
|
||||||
* install system packages
|
* install system packages
|
||||||
|
@ -249,7 +247,7 @@ Handle project workflows in a unified way:
|
||||||
* activate
|
* activate
|
||||||
* relay environment module name
|
* relay environment module name
|
||||||
|
|
||||||
#### Python
|
### Python
|
||||||
|
|
||||||
* check
|
* check
|
||||||
* .py
|
* .py
|
||||||
|
@ -266,7 +264,7 @@ Handle project workflows in a unified way:
|
||||||
* try git repo url variable first for shunit
|
* try git repo url variable first for shunit
|
||||||
* test
|
* test
|
||||||
|
|
||||||
### Task stack
|
### Later
|
||||||
|
|
||||||
* automate versions fetching
|
* automate versions fetching
|
||||||
* document behavior differences
|
* document behavior differences
|
||||||
|
|
|
@ -36,9 +36,9 @@
|
||||||
[ -n "${SPCD_URL_UBUNTU}" ] ||
|
[ -n "${SPCD_URL_UBUNTU}" ] ||
|
||||||
SPCD_URL_UBUNTU="https://ubuntu.mirrors.ovh.net/ubuntu"
|
SPCD_URL_UBUNTU="https://ubuntu.mirrors.ovh.net/ubuntu"
|
||||||
|
|
||||||
# ╭───╮
|
# ╭───────────╮
|
||||||
# │ _ │
|
# │ internals │
|
||||||
# ╰───╯
|
# ╰───────────╯
|
||||||
|
|
||||||
_spcd_fill() {
|
_spcd_fill() {
|
||||||
_spcd_fill__index=${1}
|
_spcd_fill__index=${1}
|
||||||
|
@ -49,9 +49,9 @@ _spcd_fill() {
|
||||||
unset _spcd_fill__index
|
unset _spcd_fill__index
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭───┬────────╮
|
# ╭───────────┬────────╮
|
||||||
# │ _ │ banner │
|
# │ internals │ banner │
|
||||||
# ╰───┴────────╯
|
# ╰───────────┴────────╯
|
||||||
|
|
||||||
_SPCD_BANNER_DOWN_AND_HORIZONTAL="┬"
|
_SPCD_BANNER_DOWN_AND_HORIZONTAL="┬"
|
||||||
_SPCD_BANNER_DOWN_AND_LEFT="╮"
|
_SPCD_BANNER_DOWN_AND_LEFT="╮"
|
||||||
|
@ -156,16 +156,16 @@ _spcd_banner_wipe() {
|
||||||
__SPCD_BANNER_BOTTOM
|
__SPCD_BANNER_BOTTOM
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭───┬───────╮
|
# ╭───────────┬───────╮
|
||||||
# │ _ │ error │
|
# │ internals │ error │
|
||||||
# ╰───┴───────╯
|
# ╰───────────┴───────╯
|
||||||
|
|
||||||
_SPCD_ERROR_CI=1
|
_SPCD_ERROR_CI=1
|
||||||
_SPCD_ERROR_OS=2
|
_SPCD_ERROR_OS=2
|
||||||
|
|
||||||
# ╭───┬───────╮
|
# ╭───────────┬───────╮
|
||||||
# │ _ │ frame │
|
# │ internals │ frame │
|
||||||
# ╰───┴───────╯
|
# ╰───────────┴───────╯
|
||||||
|
|
||||||
_SPCD_FRAME_TOP="╭╴"
|
_SPCD_FRAME_TOP="╭╴"
|
||||||
_SPCD_FRAME_BOTTOM="╰╴"
|
_SPCD_FRAME_BOTTOM="╰╴"
|
||||||
|
@ -178,9 +178,9 @@ _spcd_frame_shut() {
|
||||||
echo "${_SPCD_FRAME_BOTTOM}${1}"
|
echo "${_SPCD_FRAME_BOTTOM}${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭───┬────╮
|
# ╭───────────┬────╮
|
||||||
# │ _ │ os │
|
# │ internals │ os │
|
||||||
# ╰───┴────╯
|
# ╰───────────┴────╯
|
||||||
|
|
||||||
_spcd_os_cat() {
|
_spcd_os_cat() {
|
||||||
if [ -n "${1}" ]; then
|
if [ -n "${1}" ]; then
|
||||||
|
@ -190,17 +190,17 @@ _spcd_os_cat() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭───┬──────╮
|
# ╭───────────┬──────╮
|
||||||
# │ _ │ rule │
|
# │ internals │ rule │
|
||||||
# ╰───┴──────╯
|
# ╰───────────┴──────╯
|
||||||
|
|
||||||
_SPCD_RULE_LEFT="╶"
|
_SPCD_RULE_LEFT="╶"
|
||||||
_SPCD_RULE_MIDDLE="─"
|
_SPCD_RULE_MIDDLE="─"
|
||||||
_SPCD_RULE_RIGHT="╴"
|
_SPCD_RULE_RIGHT="╴"
|
||||||
|
|
||||||
# ╭───┬──────╮
|
# ╭───────────┬──────╮
|
||||||
# │ _ │ step │
|
# │ internals │ step │
|
||||||
# ╰───┴──────╯
|
# ╰───────────┴──────╯
|
||||||
|
|
||||||
_spcd_step_wipe() {
|
_spcd_step_wipe() {
|
||||||
unset \
|
unset \
|
||||||
|
@ -227,6 +227,30 @@ spcd_error_os() {
|
||||||
exit "${_SPCD_ERROR_OS}"
|
exit "${_SPCD_ERROR_OS}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ╭───────────┬─────╮
|
||||||
|
# │ functions │ git │
|
||||||
|
# ╰───────────┴─────╯
|
||||||
|
|
||||||
|
spcd_git_clone() {
|
||||||
|
if [ -n "${1}" ]; then
|
||||||
|
spcd_gc__name="$(basename "${1}")"
|
||||||
|
spcd_gc__path="${SPCD_DL}/${spcd_gc__name}"
|
||||||
|
spcd_gc__url="$(spcd_git_url "${1}")"
|
||||||
|
git clone "${spcd_gc__url}" "${spcd_gc__path}"
|
||||||
|
echo "${spcd_gc__path}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
spcd_git_url() {
|
||||||
|
if [ -n "${1}" ]; then
|
||||||
|
case "${1}" in
|
||||||
|
http*) echo "${1}" ;;
|
||||||
|
*/*) echo "${SPCD_PROJECT_ROOT}/${1}" ;;
|
||||||
|
*) echo "${SPCD_PROJECT_ROOT}/${SPCD_PROJECT_PATH}/${1}" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# ╭───────────┬─────────╮
|
# ╭───────────┬─────────╮
|
||||||
# │ functions │ openssl │
|
# │ functions │ openssl │
|
||||||
# ╰───────────┴─────────╯
|
# ╰───────────┴─────────╯
|
||||||
|
@ -339,13 +363,13 @@ spcd_step_out() {
|
||||||
__SPCD_STEP_LEVEL=$((__SPCD_STEP_LEVEL - 1))
|
__SPCD_STEP_LEVEL=$((__SPCD_STEP_LEVEL - 1))
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭──────╮
|
# ╭───────╮
|
||||||
# │ step │
|
# │ steps │
|
||||||
# ╰──────╯
|
# ╰───────╯
|
||||||
|
|
||||||
# ╭──────┬───────────╮
|
# ╭───────┬───────────╮
|
||||||
# │ step │ constants │
|
# │ steps │ constants │
|
||||||
# ╰──────┴───────────╯
|
# ╰───────┴───────────╯
|
||||||
|
|
||||||
SPCD_OS_ALMA="alma"
|
SPCD_OS_ALMA="alma"
|
||||||
SPCD_OS_ALPINE="alpine"
|
SPCD_OS_ALPINE="alpine"
|
||||||
|
@ -362,11 +386,11 @@ SPCD_PM_DNF="dnf"
|
||||||
SPCD_PM_PACMAN="pacman"
|
SPCD_PM_PACMAN="pacman"
|
||||||
SPCD_PM_ZYPPER="zypper"
|
SPCD_PM_ZYPPER="zypper"
|
||||||
|
|
||||||
# ╭──────┬─────────────╮
|
# ╭───────┬─────────────╮
|
||||||
# │ step │ environment │
|
# │ steps │ environment │
|
||||||
# ╰──────┴─────────────╯
|
# ╰───────┴─────────────╯
|
||||||
|
|
||||||
spcd_step__environment_set_variables() {
|
spcd_environment_set_variables() {
|
||||||
spcd_step "Set variables"
|
spcd_step "Set variables"
|
||||||
# check script first
|
# check script first
|
||||||
[ -n "${SPCD}" ] || spcd_error_ci "SPCD"
|
[ -n "${SPCD}" ] || spcd_error_ci "SPCD"
|
||||||
|
@ -555,6 +579,41 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")"
|
||||||
esac
|
esac
|
||||||
spcd_split
|
spcd_split
|
||||||
spcd_os_printenv "SPCD_PM"
|
spcd_os_printenv "SPCD_PM"
|
||||||
|
# set package manager variables
|
||||||
|
case "${SPCD_PM}" in
|
||||||
|
"${SPCD_PM_DNF}")
|
||||||
|
SPCD_PM_HTTPS_PATH="/etc/dnf/dnf.conf.d/https.conf"
|
||||||
|
SPCD_PM_HTTPS_TEXT="\
|
||||||
|
sslverify=False
|
||||||
|
"
|
||||||
|
;;
|
||||||
|
"${SPCD_PM_APK}")
|
||||||
|
SPCD_PM_HTTPS_PATH="/etc/apk/repositories.d/https"
|
||||||
|
SPCD_PM_HTTPS_TEXT="\
|
||||||
|
--no-verify
|
||||||
|
"
|
||||||
|
;;
|
||||||
|
"${SPCD_PM_PACMAN}")
|
||||||
|
SPCD_PM_HTTPS_PATH="/etc/pacman.d/https.conf"
|
||||||
|
SPCD_PM_HTTPS_TEXT="\
|
||||||
|
SSLVerify = No
|
||||||
|
"
|
||||||
|
;;
|
||||||
|
"${SPCD_PM_APT}")
|
||||||
|
SPCD_PM_HTTPS_PATH="/etc/apt/apt.conf.d/https"
|
||||||
|
SPCD_PM_HTTPS_TEXT="\
|
||||||
|
Acquire::https::Verify-Peer False;
|
||||||
|
"
|
||||||
|
;;
|
||||||
|
"${SPCD_PM_ZYPPER}")
|
||||||
|
SPCD_PM_HTTPS_PATH=""
|
||||||
|
SPCD_PM_HTTPS_TEXT="\
|
||||||
|
"
|
||||||
|
;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
spcd_split
|
||||||
|
spcd_os_printenv "SPCD_PM_HTTPS_PATH"
|
||||||
# specific
|
# specific
|
||||||
case "${SPCD_OS_ID}" in
|
case "${SPCD_OS_ID}" in
|
||||||
"${SPCD_OS_ALMA}")
|
"${SPCD_OS_ALMA}")
|
||||||
|
@ -705,15 +764,15 @@ ${SPCD_PYTHON_VENV}/lib/${SPCD_PYTHON_COMMAND}/site-packages"
|
||||||
spcd_os_printenv "SPCD_DL"
|
spcd_os_printenv "SPCD_DL"
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__environment_list_workspace() {
|
spcd_environment_list_workspace() {
|
||||||
spcd_step "List workspace"
|
spcd_step "List workspace"
|
||||||
spcd_lwd__path="$(realpath .)"
|
spcd_lwd__path="$(realpath .)"
|
||||||
spcd_os_ls "${spcd_lwd__path}"
|
spcd_os_ls "${spcd_lwd__path}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭──────┬───────────╮
|
# ╭───────┬───────────╮
|
||||||
# │ step │ functions │
|
# │ steps │ functions │
|
||||||
# ╰──────┴───────────╯
|
# ╰───────┴───────────╯
|
||||||
|
|
||||||
spcd_clean_cache() {
|
spcd_clean_cache() {
|
||||||
case "${SPCD_PM}" in
|
case "${SPCD_PM}" in
|
||||||
|
@ -726,37 +785,6 @@ spcd_clean_cache() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_git_clone() {
|
|
||||||
if [ -n "${1}" ]; then
|
|
||||||
spcd_gc__name="$(basename "${1}")"
|
|
||||||
spcd_gc__path="${SPCD_DL}/${spcd_gc__name}"
|
|
||||||
spcd_gc__url="$(spcd_git_url "${1}")"
|
|
||||||
git clone "${spcd_gc__url}" "${spcd_gc__path}"
|
|
||||||
echo "${spcd_gc__path}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
spcd_git_url() {
|
|
||||||
if [ -n "${1}" ]; then
|
|
||||||
case "${1}" in
|
|
||||||
http*) echo "${1}" ;;
|
|
||||||
*/*) echo "${SPCD_PROJECT_ROOT}/${1}" ;;
|
|
||||||
*) echo "${SPCD_PROJECT_ROOT}/${SPCD_PROJECT_PATH}/${1}" ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
spcd_https_path() {
|
|
||||||
case "${SPCD_PM}" in
|
|
||||||
"${SPCD_PM_APK}") echo "/etc/apk/repositories.d/https" ;;
|
|
||||||
"${SPCD_PM_APT}") echo "/etc/apt/apt.conf.d/https" ;;
|
|
||||||
"${SPCD_PM_DNF}") echo "/etc/dnf/dnf.conf.d/https.conf" ;;
|
|
||||||
"${SPCD_PM_PACMAN}") echo "/etc/pacman.d/https.conf" ;;
|
|
||||||
"${SPCD_PM_ZYPPER}") ;;
|
|
||||||
*) ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
spcd_install_package() {
|
spcd_install_package() {
|
||||||
case "${SPCD_PM}" in
|
case "${SPCD_PM}" in
|
||||||
"${SPCD_PM_APK}") apk add "${1}" ;;
|
"${SPCD_PM_APK}") apk add "${1}" ;;
|
||||||
|
@ -800,11 +828,11 @@ spcd_query_package() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭──────┬─────╮
|
# ╭───────┬─────╮
|
||||||
# │ step │ dns │
|
# │ steps │ dns │
|
||||||
# ╰──────┴─────╯
|
# ╰───────┴─────╯
|
||||||
|
|
||||||
spcd_step__dns() {
|
spcd_dns() {
|
||||||
spcd_step "DNS"
|
spcd_step "DNS"
|
||||||
while true; do
|
while true; do
|
||||||
spcd_sdr__index=$((spcd_sdr__index + 1))
|
spcd_sdr__index=$((spcd_sdr__index + 1))
|
||||||
|
@ -817,11 +845,11 @@ nameserver ${spcd_sdr__value}
|
||||||
spcd_os_write "/etc/resolv.conf" "${spcd_sdr__text}"
|
spcd_os_write "/etc/resolv.conf" "${spcd_sdr__text}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭──────┬──────────╮
|
# ╭───────┬──────────╮
|
||||||
# │ step │ packages │
|
# │ steps │ packages │
|
||||||
# ╰──────┴──────────╯
|
# ╰───────┴──────────╯
|
||||||
|
|
||||||
spcd_step__packages_set_repositories() {
|
spcd_packages_set_repositories() {
|
||||||
spcd_step "Set repositories"
|
spcd_step "Set repositories"
|
||||||
case "${SPCD_OS_ID}" in
|
case "${SPCD_OS_ID}" in
|
||||||
"${SPCD_OS_ALMA}")
|
"${SPCD_OS_ALMA}")
|
||||||
|
@ -888,7 +916,7 @@ deb ${SPCD_URL_CHOSEN} ${SPCD_OS_VERSION}-security main universe
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__packages_set_configuration() {
|
spcd_packages_set_configuration() {
|
||||||
spcd_step "Set configuration"
|
spcd_step "Set configuration"
|
||||||
case "${SPCD_PM}" in
|
case "${SPCD_PM}" in
|
||||||
"${SPCD_PM_DNF}")
|
"${SPCD_PM_DNF}")
|
||||||
|
@ -926,35 +954,15 @@ Dir::Etc::SourceParts \"\";
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__packages_trust_https() {
|
spcd_packages_trust_https() {
|
||||||
spcd_step "Trust HTTPS"
|
spcd_step "Trust HTTPS"
|
||||||
if [ -n "${SPCD_CA_1}" ] || [ "${SPCD_PM}" = "${SPCD_PM_APT}" ]; then
|
if [ -n "${SPCD_CA_1}" ] || [ "${SPCD_PM}" = "${SPCD_PM_APT}" ]; then
|
||||||
spcd_pth__path="$(spcd_https_path)"
|
spcd_os_mkdir "$(dirname "${SPCD_PM_HTTPS_PATH}")"
|
||||||
if [ -n "${spcd_pth__path}" ]; then
|
spcd_os_write "${SPCD_PM_HTTPS_PATH}" "${SPCD_PM_HTTPS_TEXT}"
|
||||||
spcd_os_mkdir "$(dirname "${spcd_pth__path}")"
|
|
||||||
case "${SPCD_PM}" in
|
|
||||||
"${SPCD_PM_APK}") spcd_pth__text="\
|
|
||||||
--no-verify
|
|
||||||
" ;;
|
|
||||||
"${SPCD_PM_APT}") spcd_pth__text="\
|
|
||||||
Acquire::https::Verify-Peer False;
|
|
||||||
" ;;
|
|
||||||
"${SPCD_PM_DNF}") spcd_pth__text="\
|
|
||||||
sslverify=False
|
|
||||||
" ;;
|
|
||||||
"${SPCD_PM_PACMAN}") spcd_pth__text="\
|
|
||||||
SSLVerify = No
|
|
||||||
" ;;
|
|
||||||
"${SPCD_PM_ZYPPER}") ;;
|
|
||||||
*) ;;
|
|
||||||
esac
|
|
||||||
[ -n "${spcd_pth__text}" ] &&
|
|
||||||
spcd_os_write "${spcd_pth__path}" "${spcd_pth__text}"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__packages_update_catalog() {
|
spcd_packages_update_catalog() {
|
||||||
spcd_step "Update catalog"
|
spcd_step "Update catalog"
|
||||||
case "${SPCD_PM}" in
|
case "${SPCD_PM}" in
|
||||||
"${SPCD_PM_APK}") apk update ;;
|
"${SPCD_PM_APK}") apk update ;;
|
||||||
|
@ -966,7 +974,7 @@ spcd_step__packages_update_catalog() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__packages_install_tools() {
|
spcd_packages_install_tools() {
|
||||||
spcd_step "Install tools"
|
spcd_step "Install tools"
|
||||||
case "${SPCD_PM}" in
|
case "${SPCD_PM}" in
|
||||||
"${SPCD_PM_APT}") spcd_install_package "apt-utils" ;;
|
"${SPCD_PM_APT}") spcd_install_package "apt-utils" ;;
|
||||||
|
@ -974,16 +982,16 @@ spcd_step__packages_install_tools() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭──────┬────╮
|
# ╭───────┬────╮
|
||||||
# │ step │ ca │
|
# │ steps │ ca │
|
||||||
# ╰──────┴────╯
|
# ╰───────┴────╯
|
||||||
|
|
||||||
spcd_step__ca_install_package() {
|
spcd_ca_install_package() {
|
||||||
spcd_step "Install package"
|
spcd_step "Install package"
|
||||||
spcd_install_package "ca-certificates"
|
spcd_install_package "ca-certificates"
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__ca_write_certificates() {
|
spcd_ca_write_certificates() {
|
||||||
spcd_step "Write certificates"
|
spcd_step "Write certificates"
|
||||||
case "${SPCD_OS_ID}" in
|
case "${SPCD_OS_ID}" in
|
||||||
"${SPCD_OS_ALMA}" | "${SPCD_OS_FEDORA}" | "${SPCD_OS_ROCKY}")
|
"${SPCD_OS_ALMA}" | "${SPCD_OS_FEDORA}" | "${SPCD_OS_ROCKY}")
|
||||||
|
@ -1012,7 +1020,7 @@ spcd_step__ca_write_certificates() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__ca_update_certificates() {
|
spcd_ca_update_certificates() {
|
||||||
spcd_step "Update certificates"
|
spcd_step "Update certificates"
|
||||||
case "${SPCD_OS_ID}" in
|
case "${SPCD_OS_ID}" in
|
||||||
"${SPCD_OS_ARCH}" | \
|
"${SPCD_OS_ARCH}" | \
|
||||||
|
@ -1031,17 +1039,16 @@ spcd_step__ca_update_certificates() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭──────┬──────────╮
|
# ╭───────┬──────────╮
|
||||||
# │ step │ packages │
|
# │ steps │ packages │
|
||||||
# ╰──────┴──────────╯
|
# ╰───────┴──────────╯
|
||||||
|
|
||||||
spcd_step__packages_verify_https() {
|
spcd_packages_verify_https() {
|
||||||
spcd_step "Verify HTTPS"
|
spcd_step "Verify HTTPS"
|
||||||
spcd_pvh__path="$(spcd_https_path)"
|
spcd_os_rm "${SPCD_PM_HTTPS_PATH}"
|
||||||
[ -n "${spcd_pvh__path}" ] && spcd_os_rm "${spcd_pvh__path}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__packages_upgrade_system() {
|
spcd_packages_upgrade_system() {
|
||||||
spcd_step "Upgrade system"
|
spcd_step "Upgrade system"
|
||||||
case "${SPCD_PM}" in
|
case "${SPCD_PM}" in
|
||||||
"${SPCD_PM_APK}") apk upgrade ;;
|
"${SPCD_PM_APK}") apk upgrade ;;
|
||||||
|
@ -1053,21 +1060,21 @@ spcd_step__packages_upgrade_system() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__packages_install_dos2unix() {
|
spcd_packages_install_dos2unix() {
|
||||||
spcd_step "Install dos2unix"
|
spcd_step "Install dos2unix"
|
||||||
spcd_install_package "dos2unix"
|
spcd_install_package "dos2unix"
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__packages_install_git() {
|
spcd_packages_install_git() {
|
||||||
spcd_step "Install Git"
|
spcd_step "Install Git"
|
||||||
spcd_install_package "git"
|
spcd_install_package "git"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭──────┬────────╮
|
# ╭───────┬────────╮
|
||||||
# │ step │ python │
|
# │ steps │ python │
|
||||||
# ╰──────┴────────╯
|
# ╰───────┴────────╯
|
||||||
|
|
||||||
spcd_step__python_install() {
|
spcd_python_install() {
|
||||||
spcd_step "Install package"
|
spcd_step "Install package"
|
||||||
spcd_install_package "${SPCD_PYTHON_PACKAGE}"
|
spcd_install_package "${SPCD_PYTHON_PACKAGE}"
|
||||||
spcd_step "Link alias to command"
|
spcd_step "Link alias to command"
|
||||||
|
@ -1094,7 +1101,7 @@ index-url = ${SPCD_URL_PYTHON}
|
||||||
spcd_step_out
|
spcd_step_out
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__python_modules() {
|
spcd_python_modules() {
|
||||||
spcd_step_in "Modules"
|
spcd_step_in "Modules"
|
||||||
spcd_ipm__target="${SPCD_PYTHON_VENV_PACKAGES}"
|
spcd_ipm__target="${SPCD_PYTHON_VENV_PACKAGES}"
|
||||||
spcd_step "List"
|
spcd_step "List"
|
||||||
|
@ -1119,7 +1126,7 @@ spcd_step__python_modules() {
|
||||||
spcd_step_out
|
spcd_step_out
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__install_packages() {
|
spcd_install_packages() {
|
||||||
spcd_step_in "OS packages"
|
spcd_step_in "OS packages"
|
||||||
# epel
|
# epel
|
||||||
spcd_step "EPEL"
|
spcd_step "EPEL"
|
||||||
|
@ -1179,7 +1186,7 @@ spcd_step__install_packages() {
|
||||||
spcd_step_out
|
spcd_step_out
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__python_write_module() {
|
spcd_python_write_module() {
|
||||||
spcd_step "Write module"
|
spcd_step "Write module"
|
||||||
for spcd_wpm__variable in \
|
for spcd_wpm__variable in \
|
||||||
OS_ID OS_VERSION \
|
OS_ID OS_VERSION \
|
||||||
|
@ -1199,7 +1206,7 @@ SPCD_STEP = ${spcd_wpm__index}
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__python_switch() {
|
spcd_python_switch() {
|
||||||
spcd_step "Switch"
|
spcd_step "Switch"
|
||||||
spcd_stp__name="$(basename "${SPCD_GIT_MAIN}")"
|
spcd_stp__name="$(basename "${SPCD_GIT_MAIN}")"
|
||||||
spcd_stp__path="$(realpath "${0}")"
|
spcd_stp__path="$(realpath "${0}")"
|
||||||
|
@ -1217,40 +1224,40 @@ ${SPCD_PYTHON_ALIAS} / ${spcd_stp__name}"
|
||||||
spcd_main() {
|
spcd_main() {
|
||||||
# environment
|
# environment
|
||||||
spcd_step_in "Environment"
|
spcd_step_in "Environment"
|
||||||
spcd_step__environment_set_variables
|
spcd_environment_set_variables
|
||||||
spcd_step__environment_list_workspace
|
spcd_environment_list_workspace
|
||||||
spcd_step_out
|
spcd_step_out
|
||||||
# dns
|
# dns
|
||||||
spcd_step__dns
|
spcd_dns
|
||||||
# packages
|
# packages
|
||||||
spcd_step_in "Packages"
|
spcd_step_in "Packages"
|
||||||
spcd_step__packages_set_repositories
|
spcd_packages_set_repositories
|
||||||
spcd_step__packages_set_configuration
|
spcd_packages_set_configuration
|
||||||
spcd_step__packages_trust_https
|
spcd_packages_trust_https
|
||||||
spcd_step__packages_update_catalog
|
spcd_packages_update_catalog
|
||||||
spcd_step__packages_install_tools
|
spcd_packages_install_tools
|
||||||
spcd_step_out
|
spcd_step_out
|
||||||
# ca
|
# ca
|
||||||
spcd_step_in "CA"
|
spcd_step_in "CA"
|
||||||
spcd_step__ca_install_package
|
spcd_ca_install_package
|
||||||
spcd_step__ca_write_certificates
|
spcd_ca_write_certificates
|
||||||
spcd_step__ca_update_certificates
|
spcd_ca_update_certificates
|
||||||
spcd_step_out
|
spcd_step_out
|
||||||
# packages
|
# packages
|
||||||
spcd_step_in "Packages"
|
spcd_step_in "Packages"
|
||||||
spcd_step__packages_verify_https
|
spcd_packages_verify_https
|
||||||
spcd_step__packages_update_catalog
|
spcd_packages_update_catalog
|
||||||
spcd_step__packages_upgrade_system
|
spcd_packages_upgrade_system
|
||||||
spcd_step__packages_install_dos2unix
|
spcd_packages_install_dos2unix
|
||||||
spcd_step__packages_install_git
|
spcd_packages_install_git
|
||||||
spcd_step_out
|
spcd_step_out
|
||||||
# python
|
# python
|
||||||
spcd_step_in "Python"
|
spcd_step_in "Python"
|
||||||
spcd_step__python_install
|
spcd_python_install
|
||||||
spcd_step__python_modules
|
spcd_python_modules
|
||||||
spcd_step__install_packages
|
spcd_install_packages
|
||||||
spcd_step__python_write_module
|
spcd_python_write_module
|
||||||
spcd_step__python_switch
|
spcd_python_switch
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_main
|
spcd_main
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue