[ubuntu] Refactor bash functions (#9055)

This commit is contained in:
Shamil Mubarakshin
2023-12-26 12:50:52 +01:00
committed by GitHub
parent d16bc5f120
commit 503ae89818
38 changed files with 191 additions and 224 deletions

View File

@@ -19,9 +19,9 @@ export PIPX_HOME=/opt/pipx
python3 -m pip install pipx
python3 -m pipx ensurepath
# Update /etc/environment
setEtcEnvironmentVariable "PIPX_BIN_DIR" $PIPX_BIN_DIR
setEtcEnvironmentVariable "PIPX_HOME" $PIPX_HOME
prependEtcEnvironmentPath $PIPX_BIN_DIR
set_etc_environment_variable "PIPX_BIN_DIR" $PIPX_BIN_DIR
set_etc_environment_variable "PIPX_HOME" $PIPX_HOME
prepend_etc_environment_path $PIPX_BIN_DIR
# Test pipx
if ! command -v pipx; then
echo "pipx was not installed or not found on PATH"
@@ -29,6 +29,6 @@ if ! command -v pipx; then
fi
# Adding this dir to PATH will make installed pip commands are immediately available.
prependEtcEnvironmentPath '$HOME/.local/bin'
prepend_etc_environment_path '$HOME/.local/bin'
invoke_tests "Tools" "Python"