diff --git a/cd.sh b/cd.sh index e054636..9af0f96 100644 --- a/cd.sh +++ b/cd.sh @@ -125,6 +125,7 @@ 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 " + cd_cat "/etc/apt/sources.list" ;; *) exit 1 ;; esac @@ -142,6 +143,7 @@ APT::Install-Recommends False; APT::Install-Suggests False; Dir::Etc::SourceParts \"\"; " + cd_cat "/etc/apt/apt.conf.d/apt.conf" ;; *) exit 1 ;; esac @@ -154,6 +156,7 @@ cd_set_https_verification_off () { cd_write "/etc/apt/apt.conf.d/https" "\ Acquire::https::Verify-Peer False; " + cd_cat "/etc/apt/apt.conf.d/https" ;; *) exit 1 ;; esac @@ -196,7 +199,7 @@ local target cd_update_ca () { cd_step "Update CA" case "${CD_OS_NAME}" in - "debian") update-ca-certificates ;; + "debian") update-ca-certificates || exit ;; *) exit 1 ;; esac } @@ -204,7 +207,7 @@ cd_update_ca () { cd_set_https_verification_on () { cd_step "Set HTTPS verification on" case "${CD_OS_NAME}" in - "debian") rm "/etc/apt/apt.conf.d/https" ;; + "debian") cd_rm "/etc/apt/apt.conf.d/https" ;; *) exit 1 ;; esac } @@ -247,6 +250,7 @@ local root cd_step "Clone parent repositories" root="$(mktemp --directory)" || exit for repository in "${@}" ; do + echo "${repository}" git clone \ "${CD_PROJECTS_URL}/${repository}" "${root}/${repository}" \ || exit @@ -266,8 +270,8 @@ cd_set_python_commands () { cd_cat () { if [ -f "${1}" ] ; then - echo "$(realpath "${1}")" - cat "${1}" + echo "↗$(realpath "${1}")" + cat "${1}" || exit fi } @@ -280,6 +284,13 @@ cd_install_package () { fi } +cd_rm () { + if [ -f "${1}" ] ; then + echo "×$(realpath "${1}")" + rm "${1}" || exit + fi +} + cd_step () { if [ "${1}" ] ; then CD_STEP=$((CD_STEP+1)) diff --git a/cd/__init__.py b/cd/__init__.py index d2b4385..f1fce8a 100644 --- a/cd/__init__.py +++ b/cd/__init__.py @@ -31,4 +31,5 @@ def install_commands(path): 'clone-branch', 'list-environment', ]: + print(command) os.symlink(path, os.path.join(user, f'{COMMANDS_PREFIX}{command}'))