File: work.sh

package info (click to toggle)
kid 0.9.6-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 2,264 kB
  • ctags: 4,633
  • sloc: python: 7,417; makefile: 120; sh: 47; xml: 4
file content (14 lines) | stat: -rwxr-xr-x 398 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# (@) bash
# source this into your shell to use a working directory.
# note: that your working directory (pwd) needs to be the same
# directory as this script for this to work properly.

function addpath() {
  m=$(echo "$1" | egrep "(^|:)$2(:|$)")
  [ -n "$m" ] && echo "$1" || echo "$2:$1" 
}

dn=$(pwd)
PYTHONPATH=$(addpath $PYTHONPATH $dn)
PATH=$(addpath $PATH "$dn/bin")
export PATH PYTHONPATH