From: Matteo Nastasi Date: Sat, 18 Apr 2020 08:48:52 +0000 (+0200) Subject: BSK_BUSTING valorization during installation (hash or brisk version if hash not found) X-Git-Tag: v5.9.0~5 X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=brisk.git;a=commitdiff_plain;h=eb67c208ecb558dbfe9f682f8496f69e10d2b3f0 BSK_BUSTING valorization during installation (hash or brisk version if hash not found) --- diff --git a/INSTALL.sh b/INSTALL.sh index 0266f47..dce6e83 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -367,6 +367,16 @@ if [ "$web_only" = "FALSE" ]; then mkdir -p "${legal_path}" chmod 777 "${legal_path}" fi + +bsk_busting="$(git rev-parse --short HEAD 2>/dev/null|| true)" +if [ "$bsk_busting" = "" ]; then + bsk_busting=$(grep '^\$G_brisk_version' web/Obj/brisk.phh | sed 's/^[^"'"'"']*["'"'"']/v/g;s/["'"'"'].*//g') +fi +if [ "$bsk_busting" = "" ]; then + echo "Retreiving bsk_busting failed" + exit 1 +fi + install -d ${web_path}__ for i in $(find web -type d | grep '/' | sed 's/^....//g'); do install -d ${web_path}__/$i @@ -422,6 +432,7 @@ s@define *( *'TABLES_CERT_N',[^)]*)@define('TABLES_CERT_N', $tables_cert_n)@g; s@define *( *'BRISK_DEBUG',[^)]*)@define('BRISK_DEBUG', $brisk_debug)@g; s@define *( *'LEGAL_PATH',[^)]*)@define('LEGAL_PATH', \"$legal_path\")@g; 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 diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 335929b..325eb9f 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -89,6 +89,8 @@ define('BRISK_SINGLE_DEBUG',0); define('BRISK_SINGLE_SESS', ""); define('DEBUGGING', "no-debugging"); +define('BSK_BUSTING', "dev"); + require_once("$DOCUMENT_ROOT/Etc/".BRISK_CONF); require_once("${G_base}Obj/ipclass.phh");