minor log style change

This commit is contained in:
2025-11-09 23:26:43 +05:00
parent 6bfc0f5e9a
commit baf45a4b10
3 changed files with 24 additions and 24 deletions

View File

@@ -5,18 +5,18 @@ include "@cbuild/include/functions.sh"
include "@cbuild/include/detect_os.sh"
function load_config {
local project_config_path="$1"
local proj_conf_file="$1"
TASK="$2"
#bool
#true or false
local quiet=$3
myprint "${BLUE}loading ${WHITE}'$project_config_path'"
myprint "${BLUE}loading ${WHITE}'$proj_conf_file'"
if [ -z "$project_config_path" ]; then
if [ -z "$proj_conf_file" ]; then
error "config path is null"
fi
if [ ! -f "$project_config_path" ]; then
error "${YELLOW}$project_config_path doesn't exist"
if [ ! -f "$proj_conf_file" ]; then
error "${YELLOW}$proj_conf_file doesn't exist"
fi
OS=$(detect_os)
@@ -32,9 +32,9 @@ function load_config {
[ -z "$TASK" ] && TASK="no_task"
# getting cbuild version from config (CBUILD_VERSION declaration is at line 2)
exec_script_line "$project_config_path" 2 $quiet
exec_script_line "$proj_conf_file" 2 $quiet
myprint_quiet $quiet "${WHITE}${project_config_path} cbuild version: ${CYAN}$CBUILD_VERSION"
myprint_quiet $quiet "${WHITE}'${proj_conf_file}' cbuild version: ${CYAN}$CBUILD_VERSION"
myprint_quiet $quiet "${WHITE}installed cbuild version: ${CYAN}$INSTALLED_CBUILD_VERSION"
# checking versions
@@ -50,13 +50,13 @@ function load_config {
# throw error on undefined variable usage
set -u
include "$project_config_path"
include "$proj_conf_file"
# load project user config
local project_user_config_path="$project_config_path.user"
file_copy_default_if_not_present "$project_user_config_path" "$project_user_config_path.default"
myprint "${BLUE}loading ${WHITE}'$project_user_config_path'"
include "$project_user_config_path"
local proj_conf_user_file="$proj_conf_file.user"
file_copy_default_if_not_present "$proj_conf_user_file" "$proj_conf_user_file.default"
myprint "${BLUE}loading ${WHITE}'$proj_conf_user_file'"
include "$proj_conf_user_file"
mkdir -p "$OUTDIR"
mkdir -p "$OBJDIR/objects"