Compare commits

...

10 commits

Author SHA1 Message Date
4be860e4cd
split
All checks were successful
/ job (push) Successful in 6m43s
2024-06-04 21:13:08 +02:00
74d4d86f17
fix 2024-06-04 20:47:19 +02:00
51f24cabcd
draw 2024-06-04 20:33:27 +02:00
d868285484
horizontal 2024-06-04 20:23:34 +02:00
35eba2088a
last 2024-06-04 20:16:43 +02:00
cd684c2939
open,shut 2024-06-04 20:15:42 +02:00
207aaf3133
box/open,shut 2024-06-04 20:15:06 +02:00
d638c7c059
split 2024-06-04 20:10:29 +02:00
ecb4f805fe
todo 2024-06-04 20:01:23 +02:00
3143207974
paths 2024-06-04 19:59:35 +02:00
2 changed files with 33 additions and 17 deletions

48
cd.sh
View file

@ -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
@ -438,7 +439,7 @@ cd_set_packages_configuration () {
cd_list_working_directory () {
cd_step "List working directory"
cd_ls "."
cd_ls "$(realpath .)"
}
cd_set_https_verification_off () {
@ -569,17 +570,23 @@ ${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)
$(cd_echo CD_SPLIT)
$(cd_echo CD_OPEN CD_SHUT)
$(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 "\
@ -593,10 +600,10 @@ ${CD_GIT_CHILD}
# functions
cd_box_open () {
echo "${CD_BOX_DOWN}${CD_BOX_LEFT} ${@}"
echo "${CD_OPEN}${@}"
}
cd_box_shut () {
echo "${CD_BOX_UP}${CD_BOX_LEFT} ${@}"
echo "${CD_SHUT}${@}"
}
cd_cat () {
@ -696,17 +703,15 @@ shift
}
cd_split () {
echo -n "\
${CD_BOX_RIGHT}${CD_BOX_HORIZONTAL}
"
echo "${CD_SPLIT}"
}
cd_step () {
CD_STEP=$((CD_STEP+1))
echo -n "\
${CD_BOX_DOWN}${CD_BOX_HORIZONTAL}
${CD_DOWN}
${CD_BOX_VERTICAL} ${CD_STEP} ${@}
${CD_BOX_UP}${CD_BOX_HORIZONTAL}
${CD_UP}
"
}
@ -724,7 +729,7 @@ local text="${2}"
# constants
CD_BOX_DOWN="╭"
CD_BOX_HORIZONTAL="─╌╌┄┄┈┈"
CD_BOX_HORIZONTAL="─"
CD_BOX_LEFT="╴"
CD_BOX_RIGHT="╶"
CD_BOX_UP="╰"
@ -746,5 +751,14 @@ 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 "${@}"

View file

@ -73,9 +73,11 @@ 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