From 58c689a05979722b563e004cfa696434d6f7fae1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 29 Apr 2024 20:16:14 +0200 Subject: [PATCH] cd_mkdir --- cd.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cd.sh b/cd.sh index d7d9fd1..bf7248a 100644 --- a/cd.sh +++ b/cd.sh @@ -140,7 +140,7 @@ APT::Install-Suggests False; Dir::Etc::SourceParts \"\"; " ;; - "alma") mkdir "/etc/dnf/dnf.conf.d" || exit ;; + "alma") cd_mkdir "/etc/dnf/dnf.conf.d" ;; *) cd_error_os "cd_set_packages_configuration" ;; esac } @@ -288,7 +288,7 @@ ${1} cd_cat () { if [ -f "${1}" ] ; then - echo "╭ $(realpath "${1}")" + echo " ↙ /etc╭ $(realpath "${1}")" cat "${1}" || exit fi } @@ -312,9 +312,16 @@ cd_install_package () { fi } +cd_mkdir () { + if [ "${1}" ] ; then + echo "→ ${1}" + mkdir --parents "${1}" || exit + fi +} + cd_rm () { if [ -e "${1}" ] ; then - echo "× $(realpath "${1}")" + echo "← $(realpath "${1}")" rm --recursive "${1}" || exit fi }