From 3143207974bf81b34c11299c66e19f873cd668c5 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 4 Jun 2024 19:59:35 +0200 Subject: [PATCH 01/10] paths --- cd.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cd.sh b/cd.sh index b7b74cb..ec5c812 100644 --- a/cd.sh +++ b/cd.sh @@ -438,7 +438,7 @@ cd_set_packages_configuration () { cd_list_working_directory () { cd_step "List working directory" - cd_ls "." + cd_ls "$(realpath .)" } cd_set_https_verification_off () { @@ -593,10 +593,10 @@ ${CD_GIT_CHILD} # functions cd_box_open () { - echo "${CD_BOX_DOWN}${CD_BOX_LEFT} ${@}" + echo "${CD_BOX_DOWN}${CD_BOX_LEFT}${@}" } cd_box_shut () { - echo "${CD_BOX_UP}${CD_BOX_LEFT} ${@}" + echo "${CD_BOX_UP}${CD_BOX_LEFT}${@}" } cd_cat () { From ecb4f805fef4bce7727adf52d26867cb8d1b4826 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 4 Jun 2024 20:01:23 +0200 Subject: [PATCH 02/10] todo --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index 3b607dd..2e512e1 100644 --- a/readme.md +++ b/readme.md @@ -73,6 +73,7 @@ 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 From d638c7c0599324683e650e10348e955dd68ddf18 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 4 Jun 2024 20:10:29 +0200 Subject: [PATCH 03/10] split --- cd.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cd.sh b/cd.sh index ec5c812..4ab4ea5 100644 --- a/cd.sh +++ b/cd.sh @@ -696,9 +696,7 @@ shift } cd_split () { - echo -n "\ -${CD_BOX_RIGHT}${CD_BOX_HORIZONTAL} -" + echo "${CD_SPLIT}" } cd_step () { @@ -746,5 +744,7 @@ CD_PM_APT="apt" CD_PM_DNF="dnf" CD_PM_PACMAN="pacman" +CD_SPLIT="${CD_BOX_RIGHT}${CD_BOX_HORIZONTAL}" + # run cd_main "${@}" From 207aaf31330b191551caf49dccc94ca60eda7714 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 4 Jun 2024 20:15:06 +0200 Subject: [PATCH 04/10] box/open,shut --- cd.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cd.sh b/cd.sh index 4ab4ea5..7ff7b2a 100644 --- a/cd.sh +++ b/cd.sh @@ -593,10 +593,10 @@ ${CD_GIT_CHILD} # functions cd_box_open () { - echo "${CD_BOX_DOWN}${CD_BOX_LEFT}${@}" + echo "${CD_BOX_OPEN}${@}" } cd_box_shut () { - echo "${CD_BOX_UP}${CD_BOX_LEFT}${@}" + echo "${CD_BOX_SHUT}${@}" } cd_cat () { @@ -744,6 +744,8 @@ 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_SPLIT="${CD_BOX_RIGHT}${CD_BOX_HORIZONTAL}" # run From cd684c2939a23bc039b8ad8ddabe047012bda570 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 4 Jun 2024 20:15:42 +0200 Subject: [PATCH 05/10] open,shut --- cd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cd.sh b/cd.sh index 7ff7b2a..ab75c04 100644 --- a/cd.sh +++ b/cd.sh @@ -576,7 +576,7 @@ local path cd_write "${CD_PYTHON_PACKAGES}/env.py" "\ $(cd_echo CD_OS_ID CD_OS_VERSION) -$(cd_echo CD_SPLIT) +$(cd_echo CD_OPEN CD_SHUT CD_SPLIT) " # cd_split From 35eba2088aee47859f5d15d383fb7075676af620 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 4 Jun 2024 20:16:43 +0200 Subject: [PATCH 06/10] last --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index 2e512e1..981cca5 100644 --- a/readme.md +++ b/readme.md @@ -80,3 +80,4 @@ from various CA, CI, OCI / OS. * integrate project repository cloning * override repository and framework locations * show previous states of directories & files +* split switch to Python step From d8682854845bd5eef71d52de79b5e6a73343186d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 4 Jun 2024 20:23:34 +0200 Subject: [PATCH 07/10] horizontal --- cd.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cd.sh b/cd.sh index ab75c04..e7fd0b3 100644 --- a/cd.sh +++ b/cd.sh @@ -576,7 +576,7 @@ local path cd_write "${CD_PYTHON_PACKAGES}/env.py" "\ $(cd_echo CD_OS_ID CD_OS_VERSION) -$(cd_echo CD_OPEN CD_SHUT CD_SPLIT) +$(cd_echo CD_HORIZONTAL CD_OPEN CD_SHUT CD_SPLIT) " # cd_split @@ -702,9 +702,9 @@ cd_split () { cd_step () { CD_STEP=$((CD_STEP+1)) echo -n "\ -${CD_BOX_DOWN}${CD_BOX_HORIZONTAL} +${CD_BOX_DOWN}${CD_HORIZONTAL} ${CD_BOX_VERTICAL} ${CD_STEP} ${@} -${CD_BOX_UP}${CD_BOX_HORIZONTAL} +${CD_BOX_UP}${CD_HORIZONTAL} " } @@ -722,7 +722,7 @@ local text="${2}" # constants CD_BOX_DOWN="╭" -CD_BOX_HORIZONTAL="─╌╌┄┄┈┈" +CD_BOX_HORIZONTAL="─" CD_BOX_LEFT="╴" CD_BOX_RIGHT="╶" CD_BOX_UP="╰" @@ -744,9 +744,10 @@ CD_PM_APT="apt" CD_PM_DNF="dnf" CD_PM_PACMAN="pacman" +CD_HORIZONTAL="${CD_BOX_HORIZONTAL}╌╌┄┄┈┈" CD_OPEN="${CD_BOX_DOWN}${CD_BOX_LEFT}" CD_SHUT="${CD_BOX_UP}${CD_BOX_LEFT}" -CD_SPLIT="${CD_BOX_RIGHT}${CD_BOX_HORIZONTAL}" +CD_SPLIT="${CD_BOX_RIGHT}${CD_HORIZONTAL}" # run cd_main "${@}" From 51f24cabcd6aa0a6cc8fe33e61f3a450814010ce Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 4 Jun 2024 20:33:27 +0200 Subject: [PATCH 08/10] draw --- cd.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/cd.sh b/cd.sh index e7fd0b3..b794c4a 100644 --- a/cd.sh +++ b/cd.sh @@ -576,7 +576,12 @@ local path cd_write "${CD_PYTHON_PACKAGES}/env.py" "\ $(cd_echo CD_OS_ID CD_OS_VERSION) -$(cd_echo CD_HORIZONTAL CD_OPEN CD_SHUT CD_SPLIT) + +$(cd_echo CD_OPEN CD_SHUT) + +$(cd_echo CD_HORIZONTAL) + +$(cd_echo CD_DOWN CD_SPLIT CD_UP) " # cd_split @@ -702,9 +707,9 @@ cd_split () { cd_step () { CD_STEP=$((CD_STEP+1)) echo -n "\ -${CD_BOX_DOWN}${CD_HORIZONTAL} +${CD_DOWN} ${CD_BOX_VERTICAL} ${CD_STEP} ${@} -${CD_BOX_UP}${CD_HORIZONTAL} +${CD_UP} " } @@ -744,10 +749,14 @@ CD_PM_APT="apt" CD_PM_DNF="dnf" CD_PM_PACMAN="pacman" -CD_HORIZONTAL="${CD_BOX_HORIZONTAL}╌╌┄┄┈┈" 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 "${@}" From 74d4d86f17ed5a6c8d5680d2eefdcc8b0b51919a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 4 Jun 2024 20:47:19 +0200 Subject: [PATCH 09/10] fix --- cd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cd.sh b/cd.sh index b794c4a..173176f 100644 --- a/cd.sh +++ b/cd.sh @@ -598,10 +598,10 @@ ${CD_GIT_CHILD} # functions cd_box_open () { - echo "${CD_BOX_OPEN}${@}" + echo "${CD_OPEN}${@}" } cd_box_shut () { - echo "${CD_BOX_SHUT}${@}" + echo "${CD_SHUT}${@}" } cd_cat () { From 4be860e4cd88d1a6fbd9b221e655e5dd161ad42d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 4 Jun 2024 21:13:08 +0200 Subject: [PATCH 10/10] split --- cd.sh | 16 +++++++++------- readme.md | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cd.sh b/cd.sh index 173176f..70add07 100644 --- a/cd.sh +++ b/cd.sh @@ -32,7 +32,8 @@ cd_main () { cd_install_ssh cd_clean_packages_cache cd_install_python_modules - cd_execute_python_module "${@}" + cd_write_python_module + cd_switch_to_python "${@}" } # steps @@ -569,10 +570,8 @@ ${CD_PYTHON_PACKAGES} cd_rm "${root}" } -cd_execute_python_module () { -local path - cd_step "Execute Python module" - # +cd_write_python_module () { + cd_step "Write Python module" cd_write "${CD_PYTHON_PACKAGES}/env.py" "\ $(cd_echo CD_OS_ID CD_OS_VERSION) @@ -583,8 +582,11 @@ $(cd_echo CD_HORIZONTAL) $(cd_echo CD_DOWN CD_SPLIT CD_UP) " - # - cd_split +} + +cd_switch_to_python () { +local path + cd_step "Switch to Python" # path="$(realpath "${0}")" echo -n "\ diff --git a/readme.md b/readme.md index 981cca5..33bf913 100644 --- a/readme.md +++ b/readme.md @@ -80,4 +80,4 @@ from various CA, CI, OCI / OS. * integrate project repository cloning * override repository and framework locations * show previous states of directories & files -* split switch to Python step +* relay Python module name