Compare commits

..

No commits in common. "4be860e4cd88d1a6fbd9b221e655e5dd161ad42d" and "42189dd17110fa5ebcdb743d3a450c1be8b53b84" have entirely different histories.

2 changed files with 17 additions and 33 deletions

48
cd.sh
View file

@ -32,8 +32,7 @@ cd_main () {
cd_install_ssh cd_install_ssh
cd_clean_packages_cache cd_clean_packages_cache
cd_install_python_modules cd_install_python_modules
cd_write_python_module cd_execute_python_module "${@}"
cd_switch_to_python "${@}"
} }
# steps # steps
@ -439,7 +438,7 @@ cd_set_packages_configuration () {
cd_list_working_directory () { cd_list_working_directory () {
cd_step "List working directory" cd_step "List working directory"
cd_ls "$(realpath .)" cd_ls "."
} }
cd_set_https_verification_off () { cd_set_https_verification_off () {
@ -570,23 +569,17 @@ ${CD_PYTHON_PACKAGES}
cd_rm "${root}" cd_rm "${root}"
} }
cd_write_python_module () { cd_execute_python_module () {
cd_step "Write Python module" local path
cd_step "Execute Python module"
#
cd_write "${CD_PYTHON_PACKAGES}/env.py" "\ cd_write "${CD_PYTHON_PACKAGES}/env.py" "\
$(cd_echo CD_OS_ID CD_OS_VERSION) $(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}")" path="$(realpath "${0}")"
echo -n "\ echo -n "\
@ -600,10 +593,10 @@ ${CD_GIT_CHILD}
# functions # functions
cd_box_open () { cd_box_open () {
echo "${CD_OPEN}${@}" echo "${CD_BOX_DOWN}${CD_BOX_LEFT} ${@}"
} }
cd_box_shut () { cd_box_shut () {
echo "${CD_SHUT}${@}" echo "${CD_BOX_UP}${CD_BOX_LEFT} ${@}"
} }
cd_cat () { cd_cat () {
@ -703,15 +696,17 @@ shift
} }
cd_split () { cd_split () {
echo "${CD_SPLIT}" echo -n "\
${CD_BOX_RIGHT}${CD_BOX_HORIZONTAL}
"
} }
cd_step () { cd_step () {
CD_STEP=$((CD_STEP+1)) CD_STEP=$((CD_STEP+1))
echo -n "\ echo -n "\
${CD_DOWN} ${CD_BOX_DOWN}${CD_BOX_HORIZONTAL}
${CD_BOX_VERTICAL} ${CD_STEP} ${@} ${CD_BOX_VERTICAL} ${CD_STEP} ${@}
${CD_UP} ${CD_BOX_UP}${CD_BOX_HORIZONTAL}
" "
} }
@ -729,7 +724,7 @@ local text="${2}"
# constants # constants
CD_BOX_DOWN="╭" CD_BOX_DOWN="╭"
CD_BOX_HORIZONTAL="─" CD_BOX_HORIZONTAL="─╌╌┄┄┈┈"
CD_BOX_LEFT="╴" CD_BOX_LEFT="╴"
CD_BOX_RIGHT="╶" CD_BOX_RIGHT="╶"
CD_BOX_UP="╰" CD_BOX_UP="╰"
@ -751,14 +746,5 @@ CD_PM_APT="apt"
CD_PM_DNF="dnf" CD_PM_DNF="dnf"
CD_PM_PACMAN="pacman" 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 # run
cd_main "${@}" cd_main "${@}"

View file

@ -73,11 +73,9 @@ from various CA, CI, OCI / OS.
* detect private key type * detect private key type
* handle git cloning credentials * handle git cloning credentials
* install rstnc and ssh from Python
* reduce single conditions with && * reduce single conditions with &&
* write Python bootstrap process * write Python bootstrap process
* integrate project repository cloning * integrate project repository cloning
* override repository and framework locations * override repository and framework locations
* show previous states of directories & files * show previous states of directories & files
* relay Python module name