Merge branch 'release-2.140.101'
[feisty_meow.git] / infobase / examples / bashisms / bashrc_with_localtmp_code.sh
1
2 # snippet of code to set all the temp folders and genesis2 state dir on a stable local
3 # temporary directory.  do not use /localtmp if it will be deleted!  this stuff is
4 # expected to persist until the user decides to clean things up.
5
6 # use a local temporary directory if possible.
7 if [ -d /localtmp ]; then
8   export FAST_LOCAL_STORAGE=/localtmp/$USER
9   export TMP=$FAST_LOCAL_STORAGE/tempo
10   mkdir -p $TMP &>/dev/null
11   chmod -R 700 $FAST_LOCAL_STORAGE
12
13   # plan on putting the state directory onto there.
14   export GENII_USER_DIR=$FAST_LOCAL_STORAGE/state-dir
15 fi
16
17 # after the above, load feisty meow scripts and they will take advantage of the
18 # TMP folder we set above.
19