added file_copy_default_if_not_present() and replace_var_value_in_script()

This commit is contained in:
2025-11-09 23:09:34 +05:00
parent 579dd5916e
commit 6bfc0f5e9a
4 changed files with 29 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ include "@cbuild/include/detect_os.sh"
function load_config {
local project_config_path="$1"
TASK="$2"
#bool
local quiet=$3
myprint "${BLUE}loading ${WHITE}'$project_config_path'"
@@ -53,10 +54,7 @@ function load_config {
# load project user config
local project_user_config_path="$project_config_path.user"
if [ ! -f "$project_user_config_path" ]; then
myprint "${YELLOW}creating default project user config ${WHITE}$project_user_config_path"
cp "$project_user_config_path.default" "$project_user_config_path"
fi
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"