diff --git a/install.sh b/install.sh index 231999fb02c7afac228d3ea3e6f359d43a82ccb3..5c9da59d54fc9eee13041a1e56e68cd7557a1d68 100755 --- a/install.sh +++ b/install.sh @@ -1,36 +1,21 @@ #!/bin/bash -PACKAGES= -ABSOLUTE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -#Checa se o usuário é root -if [[ $EUID -ne 0 ]] -then - ROOT="sudo" -else - ROOT= -fi - -#Descobre a distribuição -declare -A osInfo; -osInfo[/etc/arch-release]="pacman -S" -osInfo[/etc/debian_version]="apt-get install" - -for f in ${!osInfo[@]} -do - if [[ -f $f ]];then - DISTRO=${osInfo[$f]} - fi -done -function test { - echo $DISTRO -} + function install { - $(echo "$ROOT $DISTRO python3") - $(echo "$ROOT $DISTRO pip3") - $(echo "$ROOT pip3 --upgrade pipenv") - pipenv install + 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 + + }