Re: Question about 'patching' source code.

David Wall <[email protected]>
Newsgroups gmane.comp.gnu.mingw.user
Message-ID <[email protected]>
Good question Alexander,

I suppose the main reason is - I'm a Win10 person - I know sfa about
Linux/Bash/Sh or whatever - and that includes Mingw.
But - I need Mingw/msys to do the building and the source code comes in
Tar.gz format.

I had a play this arvo and wrote a small batch file that used 7z to
get the tar out of the .tar.gz - then the same 7z to get the files I
needed to edit out of the .tar.
I was then able to use my old Dos program - replacer.exe - to edit
the files to have what I wanted.

I was able to do this within Mingw/msys - so the next thing i'll
try is to put this all inside the batch file I already use to do
the building.

Actually - just thinking about it - my other build batch file extracts
the source code from the tar.gz - i'll try just including the replacer
program in that & see how we go.

Thanks for prompting the thinking.

Cheers,

David

Alexander Pickering wrote:
> On 10/11/2019 8:39 PM, David Wall wrote:
>> I regularly 'build' GnuCOBOL compiler from source code - however it is
>> supplied in 'tar' format.
>> I use 'tar' to unpack it and then I need to make changes to certain
>> files all the time.
>>
>> I installed msys-patch and checked thru the documentation - but it
>> processes a 'diff' file and
>> that confused me no end. Maybe I'll have to investigate how to produce a
>> 'diff' file.
>>
>> What I'd like to do is tell a patch program to:
>>
>> 1. Find this file     2. Find this text in the file    3. Replace found
>> text with new text.
>>
>> It would be easier to do within Mingw - rather than exit and make the
>> patches manually
>> then continue with the build.
> 
> Is there any reason you want to use mingw for this? This sounds like a
> job for sed + a makefile to me.
> 
> _______________________________________________
> MinGW-Users mailing list
> [email protected]
> 
> This list observes the Etiquette found at
> http://www.mingw.org/Mailing_Lists.
> We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.
> 
> _______________________________________________
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.osdn.me/mailman/listinfo/mingw-users
> Also: mailto:[email protected]?subject=unsubscribe

_______________________________________________
MinGW-Users mailing list
[email protected]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.osdn.me/mailman/listinfo/mingw-users
Also: mailto:[email protected]?subject=unsubscribe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.