1717{{ $ornl_hpc = true -}}
1818{{- end -}}
1919
20+ {{/* Set scratch_root automatically based on system type */ }}
21+ {{ $scratch_root := " ${HOME}" -}}
22+ {{- if $nrel_hpc -}}
23+ {{ $scratch_root = " /scratch/${USER}" -}}
24+ {{- else if $ornl_hpc -}}
25+ {{ $scratch_root = " /lustre/orion/${USER}" -}}
26+ {{- end -}}
27+
28+ {{/* Prompt for large install directory (pyenv, virtualenvs) */ }}
29+ {{- $use_large_install_dir := false -}}
30+ {{- $large_install_dir := " ${HOME}" -}}
31+ {{- if hasKey . " use_large_install_dir" -}}
32+ {{- $use_large_install_dir = .use_large_install_dir -}}
33+ {{- else if stdinIsATTY -}}
34+ {{- $use_large_install_dir = promptBoolOnce . " use_large_install_dir" " Install large executables in non-default location" -}}
35+ {{- end -}}
36+ {{- if $use_large_install_dir -}}
37+ {{- $default_install_dir := printf " %s /install" $scratch_root -}}
38+ {{- if and (hasKey . " large_install_dir" ) .large_install_dir -}}
39+ {{- $large_install_dir = .large_install_dir -}}
40+ {{- else if stdinIsATTY -}}
41+ {{- $large_install_dir = promptStringOnce . " large_install_dir" (printf " Large install directory [%s ]" $default_install_dir ) -}}
42+ {{- if not $large_install_dir -}}
43+ {{- $large_install_dir = $default_install_dir -}}
44+ {{- end -}}
45+ {{- else -}}
46+ {{- $large_install_dir = $default_install_dir -}}
47+ {{- end -}}
48+ {{- end -}}
49+
2050[data]
2151 use_zsh_root_dir = {{ $use_zsh_root_dir }}
2252 email = {{ $email | quote }}
2353 test_machine = {{ $test_machine }}
2454 spack_packages = false
2555 nrel_hpc = {{ $nrel_hpc }}
2656 nrel_cluster = {{ $nrel_cluster }}
27- ornl_hpc = {{ $ornl_hpc }}
57+ ornl_hpc = {{ $ornl_hpc }}
58+ scratch_root = {{ $scratch_root | quote }}
59+ large_install_dir = {{ $large_install_dir | quote }}
0 commit comments