Message ID | 20220825150703.4074125-6-peter.maydell@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | configure: fix misc shellcheck warnings | expand |
On 25/8/22 17:07, Peter Maydell wrote: > There's only one place in configure where we use `...` to execute a > command and capture the result. Switch to $() to match the rest of > the script. This silences a shellcheck warning. > > Signed-off-by: Peter Maydell <peter.maydell@linaro.org> > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configure > index d5b6546ae81..5c1992d5bce 100755 > --- a/configure > +++ b/configure > @@ -2317,7 +2317,7 @@ LINKS="$LINKS python" > LINKS="$LINKS contrib/plugins/Makefile " > for f in $LINKS ; do > if [ -e "$source_path/$f" ]; then > - mkdir -p `dirname ./$f` > + mkdir -p "$(dirname ./"$f")" Nitpicking, easier to read as "$(dirname ./${f})" Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > symlink "$source_path/$f" "$f" > fi > done
On Tue, 30 Aug 2022 at 13:13, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > > On 25/8/22 17:07, Peter Maydell wrote: > > There's only one place in configure where we use `...` to execute a > > command and capture the result. Switch to $() to match the rest of > > the script. This silences a shellcheck warning. > > > > Signed-off-by: Peter Maydell <peter.maydell@linaro.org> > > --- > > configure | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/configure b/configure > > index d5b6546ae81..5c1992d5bce 100755 > > --- a/configure > > +++ b/configure > > @@ -2317,7 +2317,7 @@ LINKS="$LINKS python" > > LINKS="$LINKS contrib/plugins/Makefile " > > for f in $LINKS ; do > > if [ -e "$source_path/$f" ]; then > > - mkdir -p `dirname ./$f` > > + mkdir -p "$(dirname ./"$f")" > > Nitpicking, easier to read as "$(dirname ./${f})" That would be missing the quoting on the inner level, I think. -- PMM
diff --git a/configure b/configure index d5b6546ae81..5c1992d5bce 100755 --- a/configure +++ b/configure @@ -2317,7 +2317,7 @@ LINKS="$LINKS python" LINKS="$LINKS contrib/plugins/Makefile " for f in $LINKS ; do if [ -e "$source_path/$f" ]; then - mkdir -p `dirname ./$f` + mkdir -p "$(dirname ./"$f")" symlink "$source_path/$f" "$f" fi done
There's only one place in configure where we use `...` to execute a command and capture the result. Switch to $() to match the rest of the script. This silences a shellcheck warning. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)