Skip to content

Commit c67a36d

Browse files
committed
Scripts: Update dist/install-devops-tools.sh
Signed-off-by: Michael Mayer <[email protected]>
1 parent fbdef6c commit c67a36d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

scripts/dist/install-devops-tools.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ BIN_DIR="${BIN_DIR:-/usr/local/bin}"
3535
TMPDIR="$(mktemp -d)"
3636
trap 'rm -rf "${TMPDIR}"' EXIT
3737

38+
export PIPX_HOME="${PIPX_HOME:-/opt/pipx}"
39+
export PIPX_BIN_DIR="${PIPX_BIN_DIR:-/usr/local/bin}"
40+
$SUDO install -d -m 0755 "${PIPX_HOME}" "${PIPX_BIN_DIR}"
41+
3842
install_apt_packages() {
3943
local packages=(
4044
bash-completion
@@ -45,6 +49,8 @@ install_apt_packages() {
4549
netcat-openbsd
4650
nfs-common
4751
percona-toolkit
52+
pipx
53+
python3-venv
4854
socat
4955
yq
5056
)
@@ -193,9 +199,15 @@ install_kubectl_neat() {
193199

194200
install_proxysql_admin() {
195201
if command -v pipx >/dev/null 2>&1; then
202+
if ! pipx ensurepath --force >/dev/null 2>&1; then
203+
echo "pipx ensurepath failed; continuing with existing PATH." >&2
204+
fi
196205
if ! pipx list 2>/dev/null | grep -q "proxysql-admin-tool"; then
197-
if ! pipx install proxysql-admin-tool; then
198-
echo "pipx install proxysql-admin-tool failed; skipping proxysql-admin-tool installation." >&2
206+
if ! pipx install proxysql-admin-tool >/dev/null 2>&1; then
207+
echo "pipx install proxysql-admin-tool from PyPI failed; trying GitHub source." >&2
208+
if ! pipx install "git+https://github.com/sysown/proxysql-admin-tool.git@master" >/dev/null 2>&1; then
209+
echo "pipx install proxysql-admin-tool failed; skipping proxysql-admin-tool installation." >&2
210+
fi
199211
fi
200212
fi
201213
else

0 commit comments

Comments
 (0)