linux/usr
Masahiro Yamada cc976614f5 gen_initramfs_list.sh: fix 'bad variable name' error
Prior to commit 858805b336 ("kbuild: add $(BASH) to run scripts with
bash-extension"), this shell script was almost always run by bash since
bash is usually installed on the system by default.

Now, this script is run by sh, which might be a symlink to dash. On such
distributions, the following code emits an error:

  local dev=`LC_ALL=C ls -l "${location}"`

You can reproduce the build error, for example by setting
CONFIG_INITRAMFS_SOURCE="/dev".

    GEN     usr/initramfs_data.cpio.gz
  ./usr/gen_initramfs_list.sh: 131: local: 1: bad variable name
  make[1]: *** [usr/Makefile:61: usr/initramfs_data.cpio.gz] Error 2

This is because `LC_ALL=C ls -l "${location}"` contains spaces.
Surrounding it with double-quotes fixes the error.

Fixes: 858805b336 ("kbuild: add $(BASH) to run scripts with bash-extension")
Reported-by: Jory A. Pratt <anarchy@gentoo.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-01-04 00:00:48 +09:00
..
include kbuild: fix 'No such file or directory' warning when cleaning 2019-12-09 10:08:21 +09:00
.gitignore kbuild: compile-test exported headers to ensure they are self-contained 2019-07-08 23:13:57 +09:00
gen_init_cpio.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gen_initramfs_list.sh gen_initramfs_list.sh: fix 'bad variable name' error 2020-01-04 00:00:48 +09:00
initramfs_data.S export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR() 2018-08-22 23:21:44 +09:00
Kconfig docs: early-userspace: move to driver-api guide 2019-07-15 11:03:01 -03:00
Makefile kbuild: clean compressed initramfs image 2019-09-24 15:54:07 -07:00