From: Matteo Nastasi Date: Sun, 13 Sep 2026 10:35:51 +0000 (+0200) Subject: INSTALL.sh: the -a option had no effect at all X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=2cdaf22ec068dcca22658737595c15dd65eac0bf;p=brisk.git INSTALL.sh: the -a option had no effect at all The sed looked for the BRISK_AUTH_CONF define in Obj/auth.phh, where it has never been: it lives in Obj/dbase_file.phh. sed did not find the file, wrote the error in the middle of the other installation lines, and the installation carried on, so -a was ignored without anybody noticing. The define is now looked for where it actually is, and if it is not found the installation says so instead of keeping quiet. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_014M1jiEq9cHdE5SE5j6vFuE --- diff --git a/INSTALL.sh b/INSTALL.sh index fe9bbdf..a424076 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -449,7 +449,16 @@ s@define *( *'PROXY_PATH',[^)]*)@define('PROXY_PATH', \"$proxy_path\")@g; s@define *( *'BSK_BUSTING',[^)]*)@define('BSK_BUSTING', \"$bsk_busting\")@g; s@define *( *'BRISK_CONF',[^)]*)@define('BRISK_CONF', \"$brisk_conf\")@g;" ${web_path}__/Obj/brisk.phh -sed -i "s@define *( *'BRISK_AUTH_CONF',[^)]*)@define('BRISK_AUTH_CONF', \"$brisk_auth_conf\")@g" ${web_path}__/Obj/auth.phh +# The define is not in Obj/auth.phh, where this sed looked for it without +# ever finding it and without saying so: -a was silently useless. It is in +# Obj/dbase_file.phh. It is now looked for where it actually is, so that a +# future move does not break the option again. +auth_conf_file="$(find ${web_path}__ -type f -name '*.ph*' -exec grep -l "define *( *'BRISK_AUTH_CONF'" {} \;)" +if [ -z "$auth_conf_file" ]; then + echo "WARNING: define BRISK_AUTH_CONF not found, -a not applied" +else + sed -i "s@define *( *'BRISK_AUTH_CONF',[^)]*)@define('BRISK_AUTH_CONF', \"$brisk_auth_conf\")@g" $auth_conf_file +fi sed -i "s@var \+cookiepath \+= \+\"[^\"]*\";@var cookiepath = \"$prefix_path\";@g" ${web_path}__/commons.js