diff --git a/bootstrap.sh b/bootstrap.sh index 393c52d..12f0681 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -120,5 +120,6 @@ if [ -f "$LOG_FILE" ]; then -e 's/\[[0-9]m//g' \ -e 's/ H //g' \ -e 's/\[3gH //g' \ - -i "$LOG_FILE" + "$LOG_FILE" > "$LOG_FILE.clean" + mv "$LOG_FILE.clean" "$LOG_FILE" fi diff --git a/cbuild.sh b/cbuild.sh index a2a3ee5..320632e 100644 --- a/cbuild.sh +++ b/cbuild.sh @@ -91,10 +91,11 @@ do fi if ask_yn "create default cbuild project config?"; then project_config_path="$new_project_dir/project.config" - cp "$CBUILD_INSTALL_DIR/default.config" "$project_config_path" + cp "$CBUILD_INSTALL_DIR/default.config" "$project_config_path.temp" myprint "Enter project name: " read -r project_name - sed -i "s,\%PROJECT_NAME\%,$project_name,g" "$project_config_path" + sed "s,\%PROJECT_NAME\%,$project_name,g" "$project_config_path.temp" > "$project_config_path" + rm "$project_config_path.temp" myprint "${GREEN}created config at '$project_config_path'" fi if ask_yn "Copy default .gitignore?"; then