# -*- sh -*-# Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.# Copyright (C) 2018 OpenCFD Ltd.## File installed for C-shell startups to select which OPENFOAM# installation to use. Not using "alternatives" because we want to be# able to set per-user level defaults, not just system-wide defaults.set openfoam_selector_dir="@OPENFOAM_SELECTOR_DATADIR@"set openfoam_selector_homefile="$HOME/@OPENFOAM_SELECTOR_HOME_FILE@"set openfoam_selector_sysfile="@OPENFOAM_SELECTOR_SYSCONFDIR@/@OPENFOAM_SELECTOR_SYSCONFIG_FILE@"# The selection nameset openfoam_selection=if(-f"$openfoam_selector_homefile")thenset openfoam_selection=`cat$openfoam_selector_homefile`else if(-f"$openfoam_selector_sysfile")thenset openfoam_selection=`cat$openfoam_selector_sysfile`endif# 1st: get selection name -> directory name correspondenceif("$openfoam_selection"!=""&&-f"$openfoam_selector_dir/$openfoam_selection")thenopenfoam_selection=`cat"$openfoam_selector_dir/$openfoam_selection"`# 2nd: test for and source OpenFOAM etc/cshrcif("$openfoam_selection"!=""&&-f"$openfoam_selection/etc/cshrc")thensource"$openfoam_selection/etc/cshrc"fifi# -----------------------------------------------------------------------------