mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-06 21:45:10 +01:00
Remove old and conflicting pgadmin4 command
This commit is contained in:
33
bin/pgadmin4
33
bin/pgadmin4
@@ -1,33 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
PGADMINVENV="pgadmin4"
|
|
||||||
VENVDIR="$HOME/.virtualenvs/${PGADMINVENV}"
|
|
||||||
|
|
||||||
if [ ! -d "$VENVDIR" ] || [ ! -e "${VENVDIR}/lib/python2.7/site-packages/pgadmin4/pgAdmin4.py" ] || [ ! -e "${VENVDIR}/lib/python2.7/site-packages/pgadmin4/config_local.py" ]; then
|
|
||||||
if [[ -z "$VIRTUAL_ENV" ]]; then
|
|
||||||
# Only activate the virtualenv if we aren't in one already
|
|
||||||
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
|
|
||||||
mkvirtualenv "${PGADMINVENV}"
|
|
||||||
echo "Downloading the wheel from https://www.pgadmin.org/download/pgadmin-4-python-wheel/ ..."
|
|
||||||
pip install https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.6/pip/pgadmin4-1.6-py2.py3-none-any.whl
|
|
||||||
echo "SERVER_MODE = False" >> "${VENVDIR}/lib/python2.7/site-packages/pgadmin4/config_local.py"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install
|
|
||||||
#echo
|
|
||||||
#echo "Download the wheel from https://www.pgadmin.org/download/pgadmin-4-python-wheel/"
|
|
||||||
#echo
|
|
||||||
#echo "Install with:"
|
|
||||||
#echo "workon pgadmin4"
|
|
||||||
#echo "pip install ./pgadmin4-1.6-py2.py3-none-any.whl"
|
|
||||||
#echo "echo "SERVER_MODE = False" >> ${VENVDIR}/lib/python2.7/site-packages/pgadmin4/config_local.py"
|
|
||||||
else
|
|
||||||
if [[ -z "$VIRTUAL_ENV" ]]; then
|
|
||||||
# Only activate the virtualenv if we aren't in one already
|
|
||||||
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
|
|
||||||
workon "${PGADMINVENV}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start
|
|
||||||
python "${VENVDIR}/lib/python2.7/site-packages/pgadmin4/pgAdmin4.py"
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user