diff --git a/cd.sh b/cd.sh index 70add07..b7b74cb 100644 --- a/cd.sh +++ b/cd.sh @@ -32,8 +32,7 @@ cd_main () { cd_install_ssh cd_clean_packages_cache cd_install_python_modules - cd_write_python_module - cd_switch_to_python "${@}" + cd_execute_python_module "${@}" } # steps @@ -439,7 +438,7 @@ cd_set_packages_configuration () { cd_list_working_directory () { cd_step "List working directory" - cd_ls "$(realpath .)" + cd_ls "." } cd_set_https_verification_off () { @@ -570,23 +569,17 @@ ${CD_PYTHON_PACKAGES} cd_rm "${root}" } -cd_write_python_module () { - cd_step "Write Python module" +cd_execute_python_module () { +local path + cd_step "Execute Python module" + # cd_write "${CD_PYTHON_PACKAGES}/env.py" "\ $(cd_echo CD_OS_ID CD_OS_VERSION) - -$(cd_echo CD_OPEN CD_SHUT) - -$(cd_echo CD_HORIZONTAL) - -$(cd_echo CD_DOWN CD_SPLIT CD_UP) +$(cd_echo CD_SPLIT) " -} - -cd_switch_to_python () { -local path - cd_step "Switch to Python" + # + cd_split # path="$(realpath "${0}")" echo -n "\ @@ -600,10 +593,10 @@ ${CD_GIT_CHILD} # functions cd_box_open () { - echo "${CD_OPEN}${@}" + echo "${CD_BOX_DOWN}${CD_BOX_LEFT} ${@}" } cd_box_shut () { - echo "${CD_SHUT}${@}" + echo "${CD_BOX_UP}${CD_BOX_LEFT} ${@}" } cd_cat () { @@ -703,15 +696,17 @@ shift } cd_split () { - echo "${CD_SPLIT}" + echo -n "\ +${CD_BOX_RIGHT}${CD_BOX_HORIZONTAL} +" } cd_step () { CD_STEP=$((CD_STEP+1)) echo -n "\ -${CD_DOWN} +${CD_BOX_DOWN}${CD_BOX_HORIZONTAL} ${CD_BOX_VERTICAL} ${CD_STEP} ${@} -${CD_UP} +${CD_BOX_UP}${CD_BOX_HORIZONTAL} " } @@ -729,7 +724,7 @@ local text="${2}" # constants CD_BOX_DOWN="╭" -CD_BOX_HORIZONTAL="─" +CD_BOX_HORIZONTAL="─╌╌┄┄┈┈" CD_BOX_LEFT="╴" CD_BOX_RIGHT="╶" CD_BOX_UP="╰" @@ -751,14 +746,5 @@ CD_PM_APT="apt" CD_PM_DNF="dnf" CD_PM_PACMAN="pacman" -CD_OPEN="${CD_BOX_DOWN}${CD_BOX_LEFT}" -CD_SHUT="${CD_BOX_UP}${CD_BOX_LEFT}" - -CD_HORIZONTAL="${CD_BOX_HORIZONTAL}╌╌┄┄┈┈" - -CD_DOWN="${CD_BOX_DOWN}${CD_HORIZONTAL}" -CD_SPLIT="${CD_BOX_RIGHT}${CD_HORIZONTAL}" -CD_UP="${CD_BOX_UP}${CD_HORIZONTAL}" - # run cd_main "${@}" diff --git a/readme.md b/readme.md index 33bf913..3b607dd 100644 --- a/readme.md +++ b/readme.md @@ -73,11 +73,9 @@ from various CA, CI, OCI / OS. * detect private key type * handle git cloning credentials -* install rstnc and ssh from Python * reduce single conditions with && * write Python bootstrap process * integrate project repository cloning * override repository and framework locations * show previous states of directories & files -* relay Python module name