[FIX] Some variables problems, export bash command reassignment, etc.
This commit is contained in:
parent
42aeb4972b
commit
30126e9daf
14
launch.sh
14
launch.sh
@ -152,7 +152,7 @@ test_postgresql_exists() {
|
||||
|
||||
test_postgresql_launched() {
|
||||
PSQL_RUNNING=$($docker_cmd inspect --format="{{ .State.Running }}" ${POSTGRES_DOCKER_NAME} 2> /dev/null)
|
||||
if test $PSQL_RUNNING == "false"; then
|
||||
if test "$PSQL_RUNNING" == "false"; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
@ -204,7 +204,7 @@ test_export() {
|
||||
fi
|
||||
}
|
||||
|
||||
export() {
|
||||
export_command() {
|
||||
# Check all variables are availables
|
||||
test_create
|
||||
# Then check some specific things for dump method
|
||||
@ -222,7 +222,7 @@ init() {
|
||||
info "Python virtual environment initialized."
|
||||
fi
|
||||
cd $PROJECT_DIR
|
||||
# On Fedora 23: postgresql-libs python3-devel python-virtualenv git-core python3-pip
|
||||
# On Fedora 23: gcc postgresql-devel python3-devel python-virtualenv git-core python3-pip redhat-rpm-config gmp-devel
|
||||
sudo apt-get install -qq libpq-dev python3-dev python-virtualenv git-core python3-pip || error_and_quit "Dependancies installation failed."
|
||||
info "Dependancies via apt-get checked/installed."
|
||||
if ! test -d "$GISSMO_DIR/.git/"; then
|
||||
@ -362,7 +362,13 @@ fi
|
||||
|
||||
if ! test -z $COMMAND; then
|
||||
check_command "$COMMAND"
|
||||
$COMMAND
|
||||
# To avoid 'export' bash command reassignement which made some failure in
|
||||
#+ Python virtualenv
|
||||
if "$COMMAND" == "export"; then
|
||||
export_command
|
||||
else
|
||||
$COMMAND
|
||||
fi
|
||||
else
|
||||
show_help
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user