Skip to content

Commit

Permalink
BUG FIX: don't use -l flag for check_package use -s for status details
Browse files Browse the repository at this point in the history
`-l` flag returns true for python-dev even though it's not installed.
  • Loading branch information
ccurtin committed Oct 4, 2016
1 parent f76bf0b commit c4c505a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bootstrap/manage_django_db_postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ function check_module(){

### CHECK LINUX PACKAGES ARE INSTALLED ###
function check_package(){
dpkg -l ${1} &> /dev/null
# find package status with -s flag
dpkg -s ${1} &> /dev/null
INSTALLED=$?
if [ $INSTALLED == 1 ]; then
echo -e ${BYELLOW}
Expand Down Expand Up @@ -228,10 +229,10 @@ check_package postgresql-9.3
check_package postgresql-client-common
check_package libpq-dev
# is needed to compile Python extension written in C ot C++, ie: psycopg2
# JUST INSTALL THIS TOO FOR NOW! EVENTUALLY NEED TO FIX THIS.
# check_package python3-dev
# USER MAY NEED A DIFFERENT VERSION OF python-dev, ie: 'python3.4-dev'
check_package python-dev
# USER MAY NEED A DIFFERENT VERSION OF python-dev, ie: 'python3.4-dev'
# JUST INSTALL THIS TOO FOR NOW! EVENTUALLY NEED TO FIX THIS.
check_package python3-dev
check_module psycopg2
check_package python-psycopg2
# Setup user and privs,
Expand Down

0 comments on commit c4c505a

Please sign in to comment.