Skip to content

Instantly share code, notes, and snippets.

@m1cr0man m1cr0man/localpip.sh
Created Dec 30, 2018

Embed
What would you like to do?
Script to link binaries from virtualenv to a dir in PATH
#!/bin/bash
IGNORED="
activate
activate.csh
activate.fish
activate_this.py
easy_install
easy_install-3.6
pip
pip3
pip3.6
python
python3
python3.6
python-config
wheel
"
source ~/.local/localpy-36/bin/activate
set -euo pipefail
pip $*
for f in ~/.local/localpy-36/bin/*; do
fname=$(basename $f)
if ! echo "$IGNORED" | grep $fname > /dev/null 2>&1 && ! [ -e ~/.local/bin/$fname ]; then
ln -s "$f" ~/.local/bin/$fname
fi
done
deactivate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.