Merge pull request #1325 from dod-ccpo/setup-script-improvements
Minor improvements to script/setup
This commit is contained in:
commit
1647d802ea
@ -40,9 +40,7 @@ reset_db() {
|
||||
local database_name="${1}"
|
||||
|
||||
# If the DB exists, drop it
|
||||
set +e
|
||||
dropdb "${database_name}"
|
||||
set -e
|
||||
dropdb --if-exists "${database_name}"
|
||||
|
||||
# Create a fresh DB
|
||||
createdb "${database_name}"
|
||||
|
@ -22,7 +22,7 @@ check_for_existing_virtual_environment() {
|
||||
local target_python_version_regex="^Python ${python_version}"
|
||||
|
||||
# Check for existing venv, and if one exists, save the Python version string
|
||||
existing_venv_version=$($(pipenv --py) --version)
|
||||
existing_venv_version=$($(pipenv --py 2> /dev/null) --version 2> /dev/null)
|
||||
if [ "$?" = "0" ]; then
|
||||
# Existing venv; see if the Python version matches
|
||||
if [[ "${existing_venv_version}" =~ ${target_python_version_regex} ]]; then
|
||||
|
@ -6,7 +6,7 @@
|
||||
source "$(dirname "${0}")"/../script/include/global_header.inc.sh
|
||||
|
||||
# create upload directory for app
|
||||
mkdir uploads | true
|
||||
mkdir -p uploads
|
||||
|
||||
# Enable database resetting
|
||||
RESET_DB="true"
|
||||
|
Loading…
x
Reference in New Issue
Block a user