Skip to content
Snippets Groups Projects
Commit bb9b4594 authored by omdj17's avatar omdj17
Browse files

Update install.sh

parent 21cd1182
No related branches found
No related tags found
No related merge requests found
#!/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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment