Re: install.sub: sh is not make, use newlines

2022-10-04 Thread Todd C . Miller
On Tue, 04 Oct 2022 18:17:02 -, Klemens Nanni wrote:

> On Tue, Sep 20, 2022 at 11:19:38AM +, Klemens Nanni wrote:
> > sh(1) happily accepts newlines inside double quotes just like in the
> > script itself:
> > 
> > $ sh -c "echo foo
> > > echo bar"
> > foo
> > bar
> > 
> > So no need to squash things into a single line as is required in make(1)
> > files.
> > 
> > OK? (for after release)
>
> Ping.

OK.

 - todd



Re: install.sub: sh is not make, use newlines

2022-10-04 Thread Klemens Nanni
On Tue, Sep 20, 2022 at 11:19:38AM +, Klemens Nanni wrote:
> sh(1) happily accepts newlines inside double quotes just like in the
> script itself:
> 
>   $ sh -c "echo foo
>   > echo bar"
>   foo
>   bar
> 
> So no need to squash things into a single line as is required in make(1)
> files.
> 
> OK? (for after release)

Ping.


Index: install.sub
===
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.1207
diff -u -p -r1.1207 install.sub
--- install.sub 27 Sep 2022 12:28:25 -  1.1207
+++ install.sub 4 Oct 2022 18:07:46 -
@@ -2927,10 +2927,10 @@ __EOT
mkdir -m 700 -p $_kernel_dir
tar -C $_kernel_dir -xzf $_kernel_dir.tgz $_kernel
rm -f $_kernel_dir.tgz
-   chroot /mnt /bin/ksh -e -c "cd ${_kernel_dir#/mnt}/$_kernel; \
-   make newbsd; \
-   [ -f /etc/bsd.re-config ] && \
-   config -e -c /etc/bsd.re-config -f bsd; \
+   chroot /mnt /bin/ksh -e -c "cd ${_kernel_dir#/mnt}/$_kernel
+   make newbsd
+   [ -f /etc/bsd.re-config ] &&
+   config -e -c /etc/bsd.re-config -f bsd
make newinstall"
) >/dev/null 2>&1 && echo " done." || echo " failed."
fi



install.sub: sh is not make, use newlines

2022-09-20 Thread Klemens Nanni
sh(1) happily accepts newlines inside double quotes just like in the
script itself:

$ sh -c "echo foo
> echo bar"
foo
bar

So no need to squash things into a single line as is required in make(1)
files.

OK? (for after release)


Index: install.sub
===
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.1205
diff -u -p -r1.1205 install.sub
--- install.sub 19 Sep 2022 15:40:36 -  1.1205
+++ install.sub 20 Sep 2022 11:15:46 -
@@ -2927,10 +2927,10 @@ __EOT
mkdir -m 700 -p $_kernel_dir
tar -C $_kernel_dir -xzf $_kernel_dir.tgz $_kernel
rm -f $_kernel_dir.tgz
-   chroot /mnt /bin/ksh -e -c "cd ${_kernel_dir#/mnt}/$_kernel; \
-   make newbsd; \
-   [ -f /etc/bsd.re-config ] && \
-   config -e -c /etc/bsd.re-config -f bsd; \
+   chroot /mnt /bin/ksh -e -c "cd ${_kernel_dir#/mnt}/$_kernel
+   make newbsd
+   [ -f /etc/bsd.re-config ] &&
+   config -e -c /etc/bsd.re-config -f bsd
make newinstall"
) >/dev/null 2>&1 && echo " done." || echo " failed."
fi