py-packs-supervisor.bash 1.54 KB
#!/bin/bash

# Instalação das dependências do supervisor no python2.X!

. ./ez_i.bash

EZ_I_SKIP_ON_V=$1
if [ -z "$EZ_I_SKIP_ON_V" ] ; then
    EZ_I_SKIP_ON_V=0
fi

BASE_INST_DIR_V=$2
# > -----------------------------------------
# Informar o diretório base da instalação!

if [ -z "$BASE_INST_DIR_V" ] ; then
    f_open_section
    BASE_INST_DIR_V="/usr/local/lb"

    QUESTION_F="Enter the installation directory. 
Use empty for \"$BASE_INST_DIR_V\"!"

    f_get_usr_input "$QUESTION_F" 1
    QUESTION_F=""
    if [ -n "$GET_USR_INPUT_R" ] ; then
        BASE_INST_DIR_V="$GET_USR_INPUT_R/lb"
    fi
    f_close_section
fi

# < -----------------------------------------

PYTHON_2_X=$3
if [ -z "$PYTHON_2_X" ] ; then
    PYTHON_2_X="2.6"
fi

VE_2_X=$4
if [ -z "$VE_2_X" ] ; then
    VE_2_X="lbg_ve26"
fi

f_open_section

TITLE_F="Install supervisor dependencies for python$PYTHON_2_X?"

f_yes_no "$TITLE_F"
TITLE_F=""

if [ ${YES_NO_R} -eq 1 ] || [ ${EZ_I_SKIP_ON_V} -eq 1 ] ; then

    cd "$SCRIPTDIR_V"
    cd ./py-packs-supervisor

    tar -zxvf ./meld3-1.0.2.tar.gz
    cd ./meld3-1.0.2
    eval "$BASE_INST_DIR_V/$VE_2_X/bin/python$PYTHON_2_X setup.py install"
    cd ..
    rm -rf ./meld3-1.0.2

    tar -zxvf ./supervisor-3.3.1.tar.gz
    cd ./supervisor-3.3.1
    eval "$BASE_INST_DIR_V/$VE_2_X/bin/python$PYTHON_2_X setup.py install"
    cd ..
    rm -rf ./supervisor-3.3.1

    tar -zxvf ./superlance-1.0.0.tar.gz
    cd ./superlance-1.0.0
    eval "$BASE_INST_DIR_V/$VE_2_X/bin/python$PYTHON_2_X setup.py install"
    cd ..
    rm -rf ./superlance-1.0.0

fi