~ salmonella-environment-setup (master) 06c613bd621fd71836bdb478868735b1a921c7ac


commit 06c613bd621fd71836bdb478868735b1a921c7ac
Author:     Mario Domenech Goulart <mario@parenteses.org>
AuthorDate: Sat Dec 9 19:21:27 2023 +0100
Commit:     Mario Domenech Goulart <mario@parenteses.org>
CommitDate: Sat Dec 9 19:21:27 2023 +0100

    run-salmonella.sh: Add support for site.conf

diff --git a/run-salmonella.sh b/run-salmonella.sh
index 79f5426..f586b9c 100755
--- a/run-salmonella.sh
+++ b/run-salmonella.sh
@@ -37,7 +37,9 @@ Configuration files will be read from:
 * $SRC_CONF_DIR
 * $LOCAL_CONF_DIR
 
-in that order.
+in that order.  If a $LOCAL_CONF_DIR/site.conf file exists, it will be
+loaded _after_ the configuration file in $SRC_CONF_DIR and _before_
+the configuration file in $LOCAL_CONF_DIR.
 
 If the environment variable CHICKEN_CORE_COMMIT_HASH is set, it is
 going to be passed to salmonella-run-publish.
@@ -137,6 +139,11 @@ run_salmonella() {
         local args
         args="--work-dir $conf_work_dir $SRC_CONF_DIR/${conf}.conf"
 
+        local site_conf_path
+        site_conf_path=$LOCAL_CONF_DIR/site.conf
+        [ -e "$site_conf_path" ] && args="$args $site_conf_path"
+
+        local local_conf_path
         local_conf_path=$LOCAL_CONF_DIR/${conf}.conf
         [ -e "$local_conf_path" ] && args="$args $local_conf_path"
 
Trap