dotfiles

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

commit 0a2160b031229dabae3e278f6b13fff3e977b22f
parent 61fe557f4c1b9d8c51efba12e342496c4148a5ae
Author: Duncaen <mail@duncano.de>
Date:   Mon, 13 Feb 2017 01:16:14 +0100

bin/venv: simplify

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

diff --git a/bin/venv b/bin/venv @@ -1,16 +1,11 @@ -#!/bin/mksh +#!/bin/sh +# venv - small POSIX shell script for python virtualenv [ -z "$1" -o ! -d "$1" ] && echo "venv: <path> [<cmd> [<arg>...]]" && exit 1 # virtualenv magic unset PYTHONHOME -export VIRTUAL_ENV=$(realpath "$1") -export PATH="$VIRTUAL_ENV/bin:$PATH" +export VIRTUAL_ENV=$(realpath "$1") PATH="$VIRTUAL_ENV/bin:$PATH" -shift 1 - -if [ "$#" -gt "1" ]; then - "${@}" -else - $(command -v mksh) -fi +shift +[ "$#" -gt "1" ] && "${@}" || "${SHELL:-/bin/sh}"