-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.sh
46 lines (34 loc) · 1.46 KB
/
setup.sh
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#--- basic config -- adjust as needed
#the location of production fasrcsw clone
test -z "$FASRCSW_PROD" && export FASRCSW_PROD=/n/helmod
test -z "$FASRCSW_OS" && export FASRCSW_OS=centos7
#default compilers and mpi stacks
#update these as versions increase.
#this assumes each FASRCSW_MPIS has been built with each FASRCSW_COMPS
#export FASRCSW_COMPS="gcc/9.3.0-fasrc01"
#export FASRCSW_COMPS="intel/17.0.4-fasrc01"
export FASRCSW_COMPS="gcc/12.1.0-fasrc01 "
export FASRCSW_MPIS="openmpi/4.1.5-fasrc01"
#the build host
export FASRCSW_BUILD_HOST_01=builds
export FASRCSW_BUILD_HOST_02=builds02
if [ "$(hostname -s)" != "$FASRCSW_BUILD_HOST_01" ] && [ "$(hostname -s)" != "$FASRCSW_BUILD_HOST_02" ]; then
echo "WARNING: the current host is not the canonical build host, use builds or builds02." >&2
fi
#rpm packager credits
export FASRCSW_AUTHOR="$(getent passwd $USER | cut -d: -f5), Harvard FAS Research Computing <[email protected]>"
#--- environment setup
#set the location of this clone
if [ -z "$BASH_SOURCE" ]; then
echo "*** ERROR *** your bash is too old -- there's no BASH_SOURCE in the environment" >&2
return 1
fi
export FASRCSW_DEV="$(dirname "$(readlink -e "$BASH_SOURCE")")" #(the abs path of the dir containing this setup.sh)
export PATH="$FASRCSW_DEV/bin:$PATH"
#create build directories
if [ ! -d "$FASRCSW_DEV"/rpmbuild/BUILD ]; then
mkdir "$FASRCSW_DEV"/rpmbuild/BUILD
fi
if [ ! -d "$FASRCSW_DEV"/appdata ]; then
mkdir "$FASRCSW_DEV"/appdata
fi