Refactor some env vars

This commit is contained in:
2024-07-29 12:21:10 -04:00
parent f27929eb1f
commit 8ad0f79b10

View File

@@ -569,6 +569,7 @@ easy() {
'NoGrowth_.txt', and 'GrowthOnly_.txt' files will be generated in the 'PrintResults' folder. 'NoGrowth_.txt', and 'GrowthOnly_.txt' files will be generated in the 'PrintResults' folder.
EOF EOF
EASY_DIR="$APPS_DIR/matlab/easy"
script="$EASY_DIR/EASYConsole.m" script="$EASY_DIR/EASYConsole.m"
# Copy templates # Copy templates
@@ -703,7 +704,8 @@ qhtcp() {
OUT_DIR="/mnt/data/out/qhtcp" OUT_DIR="/mnt/data/out/qhtcp"
STUDIES_ARCHIVE_FILE="$OUT_DIR/StudiesDataArchive.txt" STUDIES_ARCHIVE_FILE="$OUT_DIR/StudiesDataArchive.txt"
QHTCP_PROJECT_DIR="$OUT_DIR/$PROJECT" QHTCP_PROJECT_DIR="$OUT_DIR/$PROJECT"
APPS_DIR="$QHTCP_PROJECT_DIR/apps" QHTCP_TEMPLATE_DIR="$TEMPLATES_DIR/qhtcp"
STUDY_TEMPLATE_DIR="$TEMPLATES_DIR/exp"
STUDY_INFO_FILE="$QHTCP_PROJECT_DIR/StudyInfo.csv" STUDY_INFO_FILE="$QHTCP_PROJECT_DIR/StudyInfo.csv"
if [[ -d $QHTCP_PROJECT_DIR ]]; then if [[ -d $QHTCP_PROJECT_DIR ]]; then
@@ -781,7 +783,7 @@ qhtcp() {
# TODO eventually we could run this on multiple results dirs simultaneously with some refactoring # TODO eventually we could run this on multiple results dirs simultaneously with some refactoring
if ((YES)) || [[ ${#EASY_RESULTS_DIRS[@]} -eq 1 ]]; then if ((YES)) || [[ ${#EASY_RESULTS_DIRS[@]} -eq 1 ]]; then
# In automatic mode just choose the first OUT DIR in the list # In automatic mode just choose the first OUT DIR in the list
EASY_RESULT_DIR="${EASY_RESULTS_DIRS[0]}" # TODO right now just choose EASY_RESULT_DIR="${EASY_RESULTS_DIRS[0]}" # TODO right now just choose the frist one
else else
echo "Multiple EASY results dirs found in $PROJECT_SCANS_DIR" echo "Multiple EASY results dirs found in $PROJECT_SCANS_DIR"
echo "Here is a list: " echo "Here is a list: "
@@ -1468,9 +1470,7 @@ main() {
# Global directory variables # Global directory variables
TEMPLATES_DIR="$SCRIPT_DIR/templates" TEMPLATES_DIR="$SCRIPT_DIR/templates"
QHTCP_TEMPLATE_DIR="$TEMPLATES_DIR/qhtcp" APPS_DIR="$SCRIPT_DIR/apps"
STUDY_TEMPLATE_DIR="$QHTCP_TEMPLATE_DIR/ExpTemplate"
EASY_DIR="$SCRIPT_DIR/apps/matlab/easy"
DATE="$(date +%Y%m%d)" # change in EASYConsole.m to match DATE="$(date +%Y%m%d)" # change in EASYConsole.m to match
SCANS="${SCANS:-"./scans":-"/mnt/data/ExpJobs"}" SCANS="${SCANS:-"./scans":-"/mnt/data/ExpJobs"}"
SCANS_HEIRARCHY=("./scans" "/mnt/data/scans" "/mnt/data/ExpJobs") # search for an existing scans dir in this order SCANS_HEIRARCHY=("./scans" "/mnt/data/scans" "/mnt/data/ExpJobs") # search for an existing scans dir in this order