Compare commits

...

2 commits

Author SHA1 Message Date
8c5ada3f94
−printenv
All checks were successful
/ job (push) Successful in 7m40s
2024-07-29 12:51:46 +02:00
07578c896b
clean 2024-07-29 11:12:25 +02:00

21
spcd.sh
View file

@ -12,7 +12,6 @@
# main
spcd_main() {
spcd_list_environment_variables
spcd_set_environment_variables
#
spcd_list_working_directory
@ -34,7 +33,6 @@ spcd_main() {
spcd_install_python
# TODO move to Python
spcd_install_packages
spcd_clean_packages_cache
spcd_install_python_modules
spcd_write_python_module
spcd_switch_to_python "${@}"
@ -42,19 +40,6 @@ spcd_main() {
# steps
spcd_list_environment_variables() {
spcd_step "List environment variables"
for spcd_lev__name in $(printenv | cut -d = -f 1 | sort); do
if [ "${spcd_lev__name}" != "SPCD_SSH_KEY" ]; then
spcd_lev__text=
eval "spcd_lev__text=\"\${${spcd_lev__name}}\""
echo "${spcd_lev__name}=${spcd_lev__text}"
else
echo "${spcd_lev__name}"
fi
done
}
spcd_set_environment_variables() {
spcd_step "Set environment variables"
# continuous integration / github → gitea → forgejo
@ -701,11 +686,6 @@ spcd_install_packages() {
esac
}
spcd_clean_packages_cache() {
spcd_step "Clean packages cache"
${SPCD_PM_CLEAN} || exit
}
spcd_install_python_modules() {
spcd_step "Install Python modules"
spcd_ipm__root="$(mktemp --directory)" || exit
@ -810,6 +790,7 @@ spcd_install_package() {
spcd_install_package__name="${1}"
if [ -n "${spcd_install_package__name}" ]; then
${SPCD_PM_INSTALL} "${spcd_install_package__name}" || exit
${SPCD_PM_CLEAN} || exit
fi
}