From bb9b4594cdf891972c23ebc170523889a6b8551c Mon Sep 17 00:00:00 2001 From: omdj17 <omdj17@inf.ufpr.br> Date: Wed, 8 Aug 2018 22:45:31 -0300 Subject: [PATCH] Update install.sh --- install.sh | 41 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/install.sh b/install.sh index 231999f..5c9da59 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 + + } -- GitLab