From 0cb9952b32689ed525b24e2ba816f1f824b000e4 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 2 May 2024 10:19:18 +0200 Subject: [PATCH] cd_nop --- cd.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/cd.sh b/cd.sh index fdddc65..a0f90ba 100644 --- a/cd.sh +++ b/cd.sh @@ -8,7 +8,7 @@ cd \ rwx \ " -# steps +# main cd_main () { cd_set_environment cd_set_dns_resolving ${CD_DNS} @@ -30,7 +30,7 @@ cd_main () { cd_execute_python_module ${CD_PYTHON_MODULES} } -# functions +# steps cd_set_environment () { local variable @@ -43,6 +43,10 @@ local variable # case "${CD_OS_NAME}" in "debian") + case "${CD_OS_VERSION}" in + "bookworm"|"bullseye") cd_nop ;; + *) cd_error_os "CD_OS_VERSION=${CD_OS_VERSION}" ;; + esac CD_PYTHON_PACKAGE="python3" CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages" CD_CA_ROOT="/usr/local/share/ca-certificates" @@ -114,10 +118,10 @@ local file case "${CD_OS_NAME}" in "debian") cd_write "/etc/apt/sources.list" "\ -deb https://deb.debian.org/debian bookworm main -deb https://deb.debian.org/debian bookworm-backports main -deb https://deb.debian.org/debian bookworm-updates main -deb https://deb.debian.org/debian-security bookworm-security main +deb https://deb.debian.org/debian ${CD_OS_VERSION} main +deb https://deb.debian.org/debian ${CD_OS_VERSION}-backports main +deb https://deb.debian.org/debian ${CD_OS_VERSION}-updates main +deb https://deb.debian.org/debian-security ${CD_OS_VERSION}-security main " ;; "alma") @@ -287,7 +291,7 @@ ${1} "${CD_PYTHON_COMMAND}" -m "${1}" "${CD_STEP}" "${self}" } -# tools +# functions cd_cat () { if [ -f "${1}" ] ; then @@ -330,6 +334,10 @@ cd_mkdir () { fi } +cd_nop () { + true +} + cd_rm () { if [ -e "${1}" ] ; then echo "← $(realpath "${1}")" @@ -377,5 +385,5 @@ local text="${2}" fi } -# main +# run cd_main