py-packs-uwsgi.bash 1.06 KB
#!/bin/bash

# Instalação das dependências do uwsgi no python3.2!

. ./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

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

f_open_section

TITLE_F="Install uwsgi dependencies for python3.2?"

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-uwsgi

    tar -zxvf ./uwsgi-2.0.13.1.tar.gz
    cd ./uwsgi-2.0.13.1
    eval "CFLAGS=\"-Wno-format\" $BASE_INST_DIR_V/uwsgi_ve32/bin/python3.2 setup.py install"
    cd ..
    rm -rf ./uwsgi-2.0.13.1

fi