Compare commits
10 commits
42189dd171
...
4be860e4cd
Author | SHA1 | Date | |
---|---|---|---|
4be860e4cd | |||
74d4d86f17 | |||
51f24cabcd | |||
d868285484 | |||
35eba2088a | |||
cd684c2939 | |||
207aaf3133 | |||
d638c7c059 | |||
ecb4f805fe | |||
3143207974 |
2 changed files with 33 additions and 17 deletions
48
cd.sh
48
cd.sh
|
@ -32,7 +32,8 @@ 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_execute_python_module "${@}"
|
cd_write_python_module
|
||||||
|
cd_switch_to_python "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# steps
|
# steps
|
||||||
|
@ -438,7 +439,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 "."
|
cd_ls "$(realpath .)"
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_set_https_verification_off () {
|
cd_set_https_verification_off () {
|
||||||
|
@ -569,17 +570,23 @@ ${CD_PYTHON_PACKAGES}
|
||||||
cd_rm "${root}"
|
cd_rm "${root}"
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_execute_python_module () {
|
cd_write_python_module () {
|
||||||
local path
|
cd_step "Write Python module"
|
||||||
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 "\
|
||||||
|
@ -593,10 +600,10 @@ ${CD_GIT_CHILD}
|
||||||
# functions
|
# functions
|
||||||
|
|
||||||
cd_box_open () {
|
cd_box_open () {
|
||||||
echo "${CD_BOX_DOWN}${CD_BOX_LEFT} ${@}"
|
echo "${CD_OPEN}${@}"
|
||||||
}
|
}
|
||||||
cd_box_shut () {
|
cd_box_shut () {
|
||||||
echo "${CD_BOX_UP}${CD_BOX_LEFT} ${@}"
|
echo "${CD_SHUT}${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_cat () {
|
cd_cat () {
|
||||||
|
@ -696,17 +703,15 @@ shift
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_split () {
|
cd_split () {
|
||||||
echo -n "\
|
echo "${CD_SPLIT}"
|
||||||
${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_BOX_DOWN}${CD_BOX_HORIZONTAL}
|
${CD_DOWN}
|
||||||
${CD_BOX_VERTICAL} ${CD_STEP} ${@}
|
${CD_BOX_VERTICAL} ${CD_STEP} ${@}
|
||||||
${CD_BOX_UP}${CD_BOX_HORIZONTAL}
|
${CD_UP}
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -724,7 +729,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="╰"
|
||||||
|
@ -746,5 +751,14 @@ 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 "${@}"
|
||||||
|
|
|
@ -73,9 +73,11 @@ 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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue