Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / msvc / backup-config-files.ps1
1 ##############################################################################
2 ##
3 ## backup-config-files
4 ##
5 ##############################################################################
6
7 <#
8
9 .SYNOPSIS
10
11 Backup mono build configuration files, if needed.
12
13 #>
14
15 param(
16
17     ## config header file.
18     $mono_config,
19
20     ## cygconfig header file.
21     $mono_cygconfig
22 )
23
24 $include_cygconfig = Get-Content $mono_config | Select-String -pattern '#include[ ]*\"cygconfig.h\"[ ]*'
25 if($include_cygconfig -eq $null)
26 {
27         ## Backup mono_config into mono_cygconfig, overweiring any existing file.
28         Write-Host "Backup " $mono_config " -> " $mono_cygconfig
29         Copy-Item $mono_config $mono_cygconfig -Force
30 }
31
32 exit 0;