Permalink
Browse files

Demo of running virtualenv scripts. Not yet working under OSH.

  • Loading branch information...
Andy Chu
Andy Chu committed Feb 21, 2018
1 parent d7c2ba6 commit 34c67e94846342778c70776d58495eb58c05c876
Showing with 34 additions and 0 deletions.
  1. +34 −0 demo/virtualenv.sh
View
@@ -0,0 +1,34 @@
#!/bin/bash
#
# Run scripts generated by Python's virtualenv under osh.
#
# Usage:
# ./virtualenv.sh <function name>
set -o nounset
set -o pipefail
set -o errexit
readonly DIR=_tmp/test-venv
create() {
virtualenv $DIR
}
under-bash() {
# You can see PS1 change here.
bash -i <<EOF
source $DIR/bin/activate
echo DONE
EOF
}
# Hm there seem to be multiple things that don't work here.
under-osh() {
bin/osh -i <<EOF
source $DIR/bin/activate
echo DONE
EOF
}
"$@"

0 comments on commit 34c67e9

Please sign in to comment.