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 }