Created
June 27, 2016 15:32
-
-
Save edsoncelio/913d1051dcdb3b6fcea9c08f72718aa0 to your computer and use it in GitHub Desktop.
testing virtualenv debian base
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#testar a virtual env no ubuntu | |
echo '----------------------' | |
echo ' conf virtual env ' | |
echo '----------------------' | |
#verificar a instalacao | |
if [ which -a virtualenv ]; then | |
echo 'instalado...' | |
else | |
echo 'not found' | |
echo 'instalando...' | |
#sudo apt-get install python-virtualenv #ver se eh melhor ser root depois | |
sudo pip virtualenv | |
fi | |
if [ -e $HOME/work ]; then | |
rm -R $HOME/work | |
fi | |
#configuracao obs: isso da pra fazer sozinho | |
mkdir $HOME/work | |
cd $HOME/work | |
#criacao do ambiente virtual | |
virtualenv $1 | |
#almost done, para usar: | |
source $1/bin/activate #dica: pode criar um alias pra quando for usar | |
#agora ja pode instalar tudo dentro de um ambiente isolado, exemplo: | |
#pip install -r requeriments.txt | |
#esativar para usar depois: | |
#deactivate | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment