#!/usr/bin/env bash
SCRIPT_PATH=$(realpath $(dirname $0))
ROOT_PATH=$SCRIPT_PATH/../
#source $ROOT_PATH/.venv3/bin/activate
source $ROOT_PATH/.venv27/bin/activate

function idem() {
  echo $1
}

function git_log() {
   git log --graph --pretty=format:'%C(Red) %h %C(Yellow) %s'
}

function gitignore_untracked() {
    for an_arg in "$@" ; do
      echo "${an_arg}"
     done
    git status  | sed '1,/Untracked/d' | grep -v '(use' | sed -e 's/\W\(.*\)/\1/g' | tee -a .gitignore
}

function pip_cache_wheels() {
   mkdir wheels-cache
   cat requirements.txt | xargs -n1 pip wheel --wheel-dir=wheels-cache
}

function pip_install_from_wheels() {
    cat requirements.txt | xargs -n1 pip install --use-wheel --no-index --find-links=./wheels-cache
}

