I am trying to automate building some dependencies on my Win machine, throught Powershell scripting. I am just fetching sources from Github, building throught CMake etc. For one of the dependencies, I need to apply a patch from a pull request.
In my script, I am creating the asm.patch
file automatically. This is the correct patch file. If I apply this patch on a Unix environment through patch < asm.patch
, everything works fine. I have no way of applying this patch file on my Powershell script though.
The thing I tried, I installed GnuWin32 native port of patch
. In my script, I am calling it like patch -i asm.patch
because Powershell does not let me to use token <
. It calls the patch command correctly. But GnuWin32 patch port opens up a dialog related to permissions. So it is not useful for my automation needs.
Question is, what is the standard way of applying .patch
file on Powershell scripts?