Skip to content
Snippets Groups Projects
install.sh 884 B
Newer Older
omdj17's avatar
omdj17 committed
#!/bin/bash


omdj17's avatar
omdj17 committed
 
omdj17's avatar
omdj17 committed

function install {
omdj17's avatar
omdj17 committed
    sudo apt-get update
    sudo apt-get upgrade -yy
    sudo apt-get install python3 -yy
    sudo apt-get install python3-pip
    sudo pip3 install --upgrade pip
    sudo pip3 install --upgrade pipenv
    pipenv install
    pipenv run python ./src/manage.py makemigrations documento
    pipenv run python ./src/manage.py makemigrations usuario
    pipenv run python ./src/manage.py migrate
    

omdj17's avatar
omdj17 committed
	 
}  



function help {
    echo "$(basename "$0") [-i|--install] [-h|--help] -- Utilize para instalar o Farol"
    echo
    echo "onde:"
    echo "      -h mostra a ajuda e sai"
    echo "      -i instal python3, pip3, pipenv "  
}


while [[ $# > 0 ]]
do
    key="$1"
    case $key in
        -h|--help)
        help
        exit 0
        ;;
		-t|--test)
			test
			exit 0
			;;
		-i|--install)
			install
			exit 0
			;;
    esac
    shift
done