mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-20 22:38:08 +00:00
Don't error if file does not exists when updating a config option
move update before and use bin dir var
This commit is contained in:
@@ -7,6 +7,10 @@ function(UpdateConfigOption file_name old_option_name new_option_name)
|
||||
string(APPEND old_option_name "=")
|
||||
string(APPEND new_option_name "=")
|
||||
message(STATUS "Checking " ${file_name} " for " ${old_option_name} " and adding " ${new_option_name} " if it does not exist")
|
||||
if(NOT EXISTS ${file_name})
|
||||
message(STATUS ${file_name} " does not exist. Doing nothing")
|
||||
return()
|
||||
endif()
|
||||
file(READ ${file_name} current_file_contents)
|
||||
string(REPLACE "\\\n" "" current_file_contents ${current_file_contents})
|
||||
string(REPLACE "\n" ";" current_file_contents ${current_file_contents})
|
||||
|
Reference in New Issue
Block a user