spcd_os_mkdir

This commit is contained in:
Marc Beninca 2024-08-25 19:37:39 +02:00
parent 35d332a956
commit 774b7f84e5
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -643,7 +643,7 @@ spcd_set_packages_configuration() {
spcd_set_https_verification_off() { spcd_set_https_verification_off() {
if [ -n "${SPCD_CA}" ] || [ "${SPCD_PM}" = "${SPCD_PM_APT}" ]; then if [ -n "${SPCD_CA}" ] || [ "${SPCD_PM}" = "${SPCD_PM_APT}" ]; then
spcd_step "Set HTTPS verification off" spcd_step "Set HTTPS verification off"
spcd_mkdir "$(dirname "${SPCD_PM_HTTPS_PATH}")" spcd_os_mkdir "$(dirname "${SPCD_PM_HTTPS_PATH}")"
spcd_write "${SPCD_PM_HTTPS_PATH}" "${SPCD_PM_HTTPS_TEXT}" spcd_write "${SPCD_PM_HTTPS_PATH}" "${SPCD_PM_HTTPS_TEXT}"
fi fi
} }
@ -682,7 +682,7 @@ spcd_install_ca_certificates() {
spcd_write_ca_certificates() { spcd_write_ca_certificates() {
spcd_step "Write CA certificates" spcd_step "Write CA certificates"
spcd_mkdir "${SPCD_CA_ROOT}" spcd_os_mkdir "${SPCD_CA_ROOT}"
while true; do while true; do
spcd_wcc__index=$((spcd_wcc__index + 1)) spcd_wcc__index=$((spcd_wcc__index + 1))
eval "spcd_wcc__text=\"\${SPCD_CA_${spcd_wcc__index}}\"" eval "spcd_wcc__text=\"\${SPCD_CA_${spcd_wcc__index}}\""
@ -922,11 +922,11 @@ spcd_os_grep() {
sed "s|^\"\(.*\)\"$|\1|" sed "s|^\"\(.*\)\"$|\1|"
} }
spcd_mkdir() { spcd_os_mkdir() {
spcd_mkdir__path="${1}" spcd_os_mkdir__path="${1}"
if [ -n "${spcd_mkdir__path}" ]; then if [ -n "${spcd_os_mkdir__path}" ]; then
echo "${spcd_mkdir__path}" echo "${spcd_os_mkdir__path}"
mkdir --parents "${spcd_mkdir__path}" || exit mkdir --parents "${spcd_os_mkdir__path}"
fi fi
} }