forked from d101tm/tmstats
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
30 lines (21 loc) · 780 Bytes
/
setup.sh
File metadata and controls
30 lines (21 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Common setup for TMSTATS shell scripts - SOURCE this file.
if [[ $TMSTATS_SETUP != 1 ]]
then
# DreamHost setup for statistics.
export TZ=PST8PDT
# Ensure we're in the right environment
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/lib
# Put Python 3.8 in the front
export PATH="$HOME/opt/python-3.8/bin:$PATH"
# Set environment variables
# There are bugs in some versions of Bash that require the following ugly workaround
source /dev/stdin <<< "$($HOME/src/tmstats/exportsettings.py)"
export data="$workdir" # For now
export TMSTATS_SETUP=1
fi
cd "$SCRIPTPATH" # Always move to this directory (no effect if not 'source'd, of course)
# Define helper functions
isreal()
{
[[ $I_AM_D101TM == 1 ]]
}