-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e67fa98
commit dcda0b0
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@echo off | ||
REM | ||
REM Version 1.0 | ||
REM | ||
SET TMP_PSR_SEARCH=%1 | ||
IF DEFINED TMP_PSR_SEARCH SET "TMP_PSR_SEARCH=%TMP_PSR_SEARCH:"=%" | ||
IF DEFINED TMP_PSR_SEARCH SET "TMP_PSR_SEARCH=%TMP_PSR_SEARCH:`=""%" | ||
REM | ||
SET TMP_PSR_REPLACE=%2 | ||
IF DEFINED TMP_PSR_REPLACE SET "TMP_PSR_REPLACE=%TMP_PSR_REPLACE:"=%" | ||
IF DEFINED TMP_PSR_REPLACE SET "TMP_PSR_REPLACE=%TMP_PSR_REPLACE:`=\"%" | ||
REM | ||
SET TMP_PSR_TARGET_FULLFN=%3 | ||
IF NOT DEFINED TMP_PSR_TARGET_FULLFN powershell -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "Write-Host -NoNewLine ((($Input | Out-String) -Replace '%TMP_PSR_SEARCH%', '%TMP_PSR_REPLACE%') -Replace '§n', \"`n\" -Replace '§r', \"`r\")" 2> NUL: & goto :eof | ||
REM | ||
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "Set-Content -Path '%3' -NoNewLine -Value ((($Input | Out-String) -Replace '%TMP_PSR_SEARCH%', '%TMP_PSR_REPLACE%') -Replace '§n', \"`n\" -Replace '§r', \"`r\")" | ||
REM | ||
goto :eof |