• Masahiro Yamada's avatar
    gen_initramfs_list.sh: fix 'bad variable name' error · cc976614
    Masahiro Yamada authored
    Prior to commit 858805b3 ("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
        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: 858805b3 ("kbuild: add $(BASH) to run scripts with bash-extension")
    Reported-by: default avatarJory A. Pratt <anarchy@gentoo.org>
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Last commit
Last update
include Loading commit data...
.gitignore Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
gen_init_cpio.c Loading commit data...
gen_initramfs_list.sh Loading commit data...
initramfs_data.S Loading commit data...