Skip to content

Instantly share code, notes, and snippets.

@orther
Created March 8, 2013 05:49
Show Gist options
  • Save orther/5114473 to your computer and use it in GitHub Desktop.
Save orther/5114473 to your computer and use it in GitHub Desktop.
-- `pip` for my restricted user This script runs `pip` located in $PYTHONPATH with -t (target dir) set as $PYTHONPATH
#!/bin/bash
PIP="$PYTHONPATH/pip $1"
# add target dir for install and uninstall
[[ "$1" = *install ]] && PIP="$PIP -t $PYTHONPATH"
# remove first arg since it is in $PIP
shift
$PIP "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment