File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ BIN_DIR="${BIN_DIR:-/usr/local/bin}"
3535TMPDIR=" $( mktemp -d) "
3636trap ' 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+
3842install_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
194200install_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
You can’t perform that action at this time.
0 commit comments