Skip to content

Commit

Permalink
conemu: Don't overwrite config if it exists (#1375)
Browse files Browse the repository at this point in the history
  • Loading branch information
r15ch13 committed Nov 4, 2018
1 parent caabb51 commit 43b9bfc
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions conemu.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@
"ConEmu64.exe"
],
"pre_install": [
"$sample = \"$dir\\ConEmu\\ConEmu_Sample.xml\"",
"$xml = \"$dir\\ConEmu\\ConEmu.xml\"",
"if(!(Test-Path \"$xml\")) {",
" # Disable AutoUpdates",
"$cont = Get-Content $sample -Raw",
"$keys = @('Update.CheckOnStartup', 'Update.CheckHourly')",
"foreach($key in $keys) {",
" $find = \"<value name=\"\"$key\"\" type=\"\"hex\"\" data=\"\"\\d+\"\"/>\"",
" $replace = \"<value name=\"\"$key\"\" type=\"\"hex\"\" data=\"\"00\"\"/>\"",
" $cont = $cont -replace $find, $replace",
"}",
"Set-Content $xml $cont -Encoding Ascii -Force"
" $cont = Get-Content \"$dir\\ConEmu\\ConEmu_Sample.xml\" -Raw",
" $keys = @('Update.CheckOnStartup', 'Update.CheckHourly')",
" foreach($key in $keys) {",
" $find = \"<value name=\"\"$key\"\" type=\"\"hex\"\" data=\"\"\\d+\"\"/>\"",
" $replace = \"<value name=\"\"$key\"\" type=\"\"hex\"\" data=\"\"00\"\"/>\"",
" $cont = $cont -replace $find, $replace",
" }",
" Set-Content $xml $cont -Encoding Ascii -Force",
"}"
],
"shortcuts": [
[
Expand Down

0 comments on commit 43b9bfc

Please sign in to comment.