Skip to content

Instantly share code, notes, and snippets.

@netmarkjp
Created September 7, 2013 02:34
Show Gist options
  • Save netmarkjp/6472307 to your computer and use it in GitHub Desktop.
Save netmarkjp/6472307 to your computer and use it in GitHub Desktop.

Revisions

  1. netmarkjp created this gist Sep 7, 2013.
    12 changes: 12 additions & 0 deletions envwrapper.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    #!/bin/sh
    # from http://d.hatena.ne.jp/heavenshell/20121122/1353597292
    VENV=$1
    echo $VENV
    if [ -z $VENV ]; then
    echo "usage: runinenv [virtualenv_path] CMDS"
    exit 1
    fi
    . ${VENV}/bin/activate
    shift 1
    echo "Executing $@ in ${VENV}"
    exec "$@"