Re: [PATCH] Bad sed expression in bootstrap.bat

2023-01-02 Thread Giangiacomo Zaffini
Updated bootstrap.bat runs well on my Windows 11 laptop. Thank You. Il giorno sab 31 dic 2022 alle ore 22:15 Paul Smith ha scritto: > On Mon, 2022-12-26 at 09:34 -0500, Paul Smith wrote: > Anyway I pushed a fix to bootstrap.bat that hopefully avoids the issue. > I was still not ever able to

Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-31 Thread Paul Smith
On Mon, 2022-12-26 at 09:34 -0500, Paul Smith wrote: > > If you do this with "echo", you don't need to worry about backslash > > munging, I think, since cmd.exe's "echo" is very simple-minded, and > > just blindly copies every character, including the quotes. > > Oh... OK I will give this a try

Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-26 Thread Paul Smith
On Mon, 2022-12-26 at 16:30 +0200, Eli Zaretskii wrote: > Well, if that is a problem, you could have bootstrap.bat write that > file for you. I thought of that but how can I write a file containing backslashes? > If you do this with "echo", you don't need to worry about backslash > munging, I

Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-26 Thread Eli Zaretskii
> From: Paul Smith > Cc: gzaf...@gmail.com, bug-make@gnu.org > Date: Mon, 26 Dec 2022 09:15:56 -0500 > > On Mon, 2022-12-26 at 05:29 +0200, Eli Zaretskii wrote: > > How about reading the Sed script from a file, with the -f command- > > line argument? > > That would work. It's annoying to have

Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-26 Thread Paul Smith
On Mon, 2022-12-26 at 05:29 +0200, Eli Zaretskii wrote: > How about reading the Sed script from a file, with the -f command- > line argument? That would work. It's annoying to have to add an entirely new file in source control just to work around this though. > > bootstrap.bat is the

Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-25 Thread Eli Zaretskii
> From: Paul Smith > Cc: gzaf...@gmail.com, bug-make@gnu.org > Date: Sun, 25 Dec 2022 21:02:25 -0500 > > On Sun, 2022-12-25 at 19:20 +0200, Eli Zaretskii wrote: > > So this command will work differently depending on which version of > > Windows it runs, and therefore I would suggest to replace

Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-25 Thread Paul Smith
On Sun, 2022-12-25 at 19:20 +0200, Eli Zaretskii wrote: > So this command will work differently depending on which version of > Windows it runs, and therefore I would suggest to replace it with > something that doesn't need to double or triple backslashes, in order > for it to be more portable. I

Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-25 Thread Eli Zaretskii
> From: Paul Smith > Cc: bug-make@gnu.org > Date: Sun, 25 Dec 2022 09:06:53 -0500 > > On Sun, 2022-12-25 at 02:29 +0100, Giangiacomo Zaffini wrote: > > I cannot see where > > sed -e "s/$/ \\/" > > can be wrong on Windows command line or Windows PowerShell. > > It's because, apparently, cmd.exe

Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-25 Thread Paul Smith
On Sun, 2022-12-25 at 02:29 +0100, Giangiacomo Zaffini wrote: > I cannot see where > sed -e "s/$/ \\/" > can be wrong on Windows command line or Windows PowerShell. It's because, apparently, cmd.exe sees the "\\" and turns it into a single "\" before it invokes the command. Then the syntax is:

Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-24 Thread Giangiacomo Zaffini
I successfully tested modified bootstrap.bat on both Windows command line and Windows PowerShell (PSVersion 7.2.6) with sed.exe (GNU sed) 4.8 that is the latest on Windows according to the used installer scoop. ``` PS C:\Users\gzaff\Devs\make> .\bootstrap.bat -- Downloading Gnulib modules --

Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-24 Thread Paul Smith
On Sat, 2022-12-24 at 11:32 -0500, Paul Smith wrote: > On Thu, 2022-12-22 at 18:17 +0100, Giangiacomo Zaffini wrote: > > C:\Users\gzaff\scoop\apps\sed\current\sed.exe: -e expression #4, > > char 9: unterminated `s' command > > Interestingly, this works fine [for me] and the replacement version >

Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-24 Thread Paul Smith
On Thu, 2022-12-22 at 18:17 +0100, Giangiacomo Zaffini wrote: > C:\Users\gzaff\scoop\apps\sed\current\sed.exe: -e expression #4, char > 9: unterminated `s' command Someone else mentioned this a week or so ago. Interestingly, this works fine with the version of sed I have installed (the version

[PATCH] Bad sed expression in bootstrap.bat

2022-12-22 Thread Giangiacomo Zaffini
Lately I read that make can be built on source with TCC Tiny C Compiler on Windows. So as an exercise I tried to do so. While bootstrapping on Windows 11 machine I noticed bootstrap/bat complaining about a sed expression ``` **