dotfiles

configuration files
git clone https://pi.duncano.de/git/dotfiles.git
Log | Files | Refs | README

commit ec85a57e4a70a007900c92f3b0cfb8afa05afdcc
parent fe3362922f27704f558391ed6132033038e04a13
Author: Duncaen <mail@duncano.de>
Date:   Wed, 15 Jul 2015 19:35:27 +0200

fix and simplify venv

Diffstat:
bin/venv | 18+++---------------
1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/bin/venv b/bin/venv @@ -1,28 +1,16 @@ #!/bin/mksh -function usage { - cat <<EOF - Usage: $(basename $0) <path> [<cmd> <args>] -EOF - exit -} - -[ -n "$1" ] || -[ -d "$1" ] || echo "venv: $1 not found" & exit 1 - -if [ -n "$1" || ! -d "$1" ]; then +if [ -z "$1" -o ! -d "$1" ]; then echo "venv: <path> [<cmd> [<arg>...]]" & exit 1 fi # virtualenv magic unset PYTHONHOME -export VIRTUAL_ENV="$1" -export PATH="$1/bin:$PATH" +export VIRTUAL_ENV=$(realpath "$1") +export PATH="$VIRTUAL_ENV/bin:$PATH" shift 1 -echo "$#" - if [ "$#" -gt "1" ]; then "${@}" else