Last active
January 31, 2017 20:46
-
-
Save cbertelegni/7fea45bd0a79ee41f04b4a6982684517 to your computer and use it in GitHub Desktop.
Script para descagar books16 para La Nacion Data
This file contains hidden or 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 | |
# path del script. | |
SCRIPT=$(readlink -f $0) | |
SCRIPTPATH=`dirname $SCRIPT` | |
PJ_FOLDER=books16 | |
VENV=venv_books16 | |
GIT_REPOSITORY="https://github.com/lanacioncom/books16.git" | |
DEFAULT_BRANCH=lanacion | |
# crear el entorno virtual | |
if [ ! -d "$VENV" ]; then | |
virtualenv $VENV | |
fi | |
# clonar el repo | |
if [ ! -d "$PJ_FOLDER" ]; then | |
git clone $GIT_REPOSITORY | |
fi | |
# activar el entorno virtual | |
source $SCRIPTPATH/$VENV/bin/activate | |
# ingresar al proyecto | |
cd $SCRIPTPATH/$PJ_FOLDER | |
# cambiar al branch de lanacion | |
git checkout lanacion | |
git branch -v | |
# hacer pull de los ultimos cambios | |
git pull origin $DEFAULT_BRANCH | |
# actualizar dependencias de python | |
pip install -r requirements.txt | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment