Compare commits
5 commits
0ad80b2761
...
ee1cb0af52
Author | SHA1 | Date | |
---|---|---|---|
ee1cb0af52 | |||
deb1ce6c49 | |||
c7617ec6c6 | |||
0387195fa8 | |||
7a8b64c3b4 |
1 changed files with 20 additions and 19 deletions
39
spcd.sh
39
spcd.sh
|
@ -528,14 +528,13 @@ spcd_set_https_verification_off() {
|
|||
|
||||
spcd_set_dns_resolving() {
|
||||
spcd_step "Set DNS resolving"
|
||||
spcd_sdr__index=1
|
||||
eval "spcd_sdr__value=\"\${SPCD_DNS_${spcd_sdr__index}}\""
|
||||
while [ -n "${spcd_sdr__value}" ]; do
|
||||
while true; do
|
||||
spcd_sdr__index=$((spcd_sdr__index + 1))
|
||||
eval "spcd_sdr__value=\"\${SPCD_DNS_${spcd_sdr__index}}\""
|
||||
[ -n "${spcd_sdr__value}" ] || break
|
||||
spcd_sdr__text="${spcd_sdr__text}\
|
||||
nameserver ${spcd_sdr__value}
|
||||
"
|
||||
spcd_sdr__index=$((spcd_sdr__index + 1))
|
||||
eval "spcd_sdr__value=\"\${SPCD_DNS_${spcd_sdr__index}}\""
|
||||
done
|
||||
spcd_write "${SPCD_DNS_FILE}" "${spcd_sdr__text}"
|
||||
}
|
||||
|
@ -558,15 +557,14 @@ spcd_install_ca_certificates() {
|
|||
spcd_write_ca_certificates() {
|
||||
spcd_step "Write CA certificates"
|
||||
spcd_mkdir "${SPCD_CA_ROOT}"
|
||||
spcd_wcc__index=1
|
||||
eval "spcd_wcc__text=\"\${SPCD_CA_${spcd_wcc__index}}\""
|
||||
while [ -n "${spcd_wcc__text}" ]; do
|
||||
while true; do
|
||||
spcd_wcc__index=$((spcd_wcc__index + 1))
|
||||
eval "spcd_wcc__text=\"\${SPCD_CA_${spcd_wcc__index}}\""
|
||||
[ -n "${spcd_wcc__text}" ] || break
|
||||
spcd_wcc__path="${SPCD_CA_ROOT}/${spcd_wcc__index}.crt"
|
||||
spcd_split
|
||||
spcd_write "${spcd_wcc__path}" "${spcd_wcc__text}"
|
||||
spcd_openssl "${spcd_wcc__path}"
|
||||
spcd_wcc__index=$((spcd_wcc__index + 1))
|
||||
eval "spcd_wcc__text=\"\${SPCD_CA_${spcd_wcc__index}}\""
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -706,21 +704,22 @@ spcd_install_packages() {
|
|||
index-url = ${SPCD_URL_PYTHON}
|
||||
"
|
||||
spcd_split
|
||||
spcd_ip__venv="/opt/venv"
|
||||
"${SPCD_PYTHON_ALIAS}" -m "venv" "${spcd_ip__venv}"
|
||||
. "${spcd_ip__venv}/bin/activate"
|
||||
"${SPCD_PYTHON_ALIAS}" -m "venv" "${SPCD_VENV}"
|
||||
spcd_split
|
||||
. "${SPCD_VENV}/bin/activate"
|
||||
spcd_split
|
||||
pip install --upgrade "pip"
|
||||
spcd_split
|
||||
pip install \
|
||||
"pelican" \
|
||||
"ruff" \
|
||||
"sphinx"
|
||||
"pelican" \
|
||||
"ruff" \
|
||||
"sphinx"
|
||||
}
|
||||
|
||||
spcd_install_python_modules() {
|
||||
spcd_step "Install Python modules"
|
||||
spcd_ipm__root="$(mktemp --directory)" || exit
|
||||
spcd_ipm__target="${SPCD_VENV}/lib/${SPCD_PYTHON_COMMAND}/site-packages"
|
||||
echo "→ ${spcd_ipm__root}"
|
||||
for spcd_ipm__repository in "${SPCD_GIT_MAIN}" "${SPCD_GIT_ROOT}"; do
|
||||
case "${spcd_ipm__repository}" in
|
||||
|
@ -742,15 +741,15 @@ ${spcd_ipm__url}
|
|||
echo "\
|
||||
${spcd_ipm__path}
|
||||
↓
|
||||
${SPCD_PYTHON_PACKAGES}"
|
||||
cp --recursive "${spcd_ipm__path}" "${SPCD_PYTHON_PACKAGES}" ||
|
||||
${spcd_ipm__target}"
|
||||
cp --recursive "${spcd_ipm__path}" "${spcd_ipm__target}" ||
|
||||
exit
|
||||
# check matching of file and variable
|
||||
spcd_ipm__script="${spcd_ipm__root}/${spcd_ipm__name}/spcd.sh"
|
||||
if [ -f "${spcd_ipm__script}" ]; then
|
||||
spcd_split
|
||||
spcd_ipm__check="${spcd_ipm__root}/check.sha512sum"
|
||||
sha512sum "${spcd_ipm__script}" > "${spcd_ipm__check}"
|
||||
sha512sum "${spcd_ipm__script}" >"${spcd_ipm__check}"
|
||||
printf "%s" "${SPCD}" >"${spcd_ipm__script}"
|
||||
ls -l "${spcd_ipm__script}"
|
||||
dos2unix "${spcd_ipm__script}"
|
||||
|
@ -949,6 +948,8 @@ SPCD_PM_APT="apt"
|
|||
SPCD_PM_DNF="dnf"
|
||||
SPCD_PM_PACMAN="pacman"
|
||||
|
||||
SPCD_VENV="/opt/venv"
|
||||
|
||||
SPCD_HORIZONTAL="────╌╌╌╌┄┄┄┄┈┈┈┈"
|
||||
|
||||
SPCD_OPEN="${SPCD_BOX_DOWN}${SPCD_BOX_LEFT}"
|
||||
|
|
Loading…
Reference in a new issue