Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/file/2f016bfda114/SETPATH
Дата изменения: Unknown
Дата индексирования: Sun Feb 3 07:54:50 2013
Кодировка:
allpy: 2f016bfda114 SETPATH

allpy

view SETPATH @ 669:2f016bfda114

Massive changes to my program
author Boris Burkov <BurkovBA@gmail.com>
date Fri, 01 Jul 2011 09:52:49 +0400
parents
children
line source
1 #!/bin/bash
3 say () { echo "$@" >&2; }
5 main () {
6 local newPYTHONPATH
8 [[ "$0" != *sh ]] && say "Usage: . $0" && return 1
10 newPYTHONPATH="$(readlink -f "$(dirname "$BASH_SOURCE")")"
12 [[ "$PYTHONPATH" = "$newPYTHONPATH" ]] && say "Already done" && return
13 [[ -n "$PYTHONPATH" ]] && say "PYTHONPATH was not empty" && return
15 export PYTHONPATH="$newPYTHONPATH"
16 export PATH="$newPYTHONPATH/utils:$PATH"
18 echo "PYTHONPATH=$PYTHONPATH"
19 echo "PATH=$PATH"
20 }
22 main