Skip to content

Instantly share code, notes, and snippets.

@cbertelegni
Last active January 31, 2017 20:46
Show Gist options
  • Save cbertelegni/7fea45bd0a79ee41f04b4a6982684517 to your computer and use it in GitHub Desktop.
Save cbertelegni/7fea45bd0a79ee41f04b4a6982684517 to your computer and use it in GitHub Desktop.
Script para descagar books16 para La Nacion Data
#! /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