From 30126e9daff0061cedce988f5e22d0b89f5a5332 Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Mon, 15 Feb 2016 11:40:16 +0100 Subject: [PATCH] [FIX] Some variables problems, export bash command reassignment, etc. --- launch.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/launch.sh b/launch.sh index 65abfda..2f3d90d 100755 --- a/launch.sh +++ b/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