Compare commits

..

No commits in common. "8c5ada3f94ab69f582ef9ab9d1d63e35ace7d943" and "dd12290f3eb7dc70e5adbbf32b33cc3109a2cf72" have entirely different histories.

21
spcd.sh
View file

@ -12,6 +12,7 @@
# main
spcd_main() {
spcd_list_environment_variables
spcd_set_environment_variables
#
spcd_list_working_directory
@ -33,6 +34,7 @@ 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 "${@}"
@ -40,6 +42,19 @@ 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
@ -686,6 +701,11 @@ 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
@ -790,7 +810,6 @@ 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
}