PageRenderTime 81ms CodeModel.GetById 40ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/src/gdata-swap.sh

http://googlecl.googlecode.com/
Shell | 17 lines | 14 code | 1 blank | 2 comment | 1 complexity | e27ea78426783d3b8836239d42c361b8 MD5 | raw file
 1#!/bin/bash
 2# Swap the gdata library
 3echo PYTHONPATH is $PYTHONPATH
 4LIB=~/lib
 5LIB_PATH=`cd ~/lib; pwd`
 6GDATA_OLD="python-old"
 7GDATA_NEW="python"
 8GDATA_OLD_PATH=$LIB_PATH/$GDATA_OLD
 9GDATA_NEW_PATH=$LIB_PATH/$GDATA_NEW
10
11if [[ "$PYTHONPATH" =~ "$GDATA_OLD_PATH" ]]
12then
13  export PYTHONPATH=${PYTHONPATH/$GDATA_OLD_PATH/$GDATA_NEW_PATH}
14else
15  export PYTHONPATH=${PYTHONPATH/$GDATA_NEW_PATH/$GDATA_OLD_PATH}
16fi
17echo Changed PYTHONPATH to $PYTHONPATH