Bash compatibility TODO

Aaro Koskinen aaro.koskinen at iki.fi
Mon Jun 27 20:43:27 UTC 2022


Hi all,

Looks like it's not possible to build mainline Linux anymore with the
busybox as "bash". :-(

$ make
  CC      scripts/mod/empty.o
./scripts/check-local-export: line 17: shopt: not found
make[1]: *** [scripts/Makefile.build:249: scripts/mod/empty.o] Error 127
make[1]: *** Deleting file 'scripts/mod/empty.o'
make: *** [Makefile:1199: prepare0] Error 2

It seems the requirement is to support "lastpipe" option:

	# Run the last element of a pipeline in the current shell.
	# Without this, the while-loop would be executed in a subshell, and
	# the changes made to 'symbol_types' and 'export_symbols' would be lost.
	shopt -s lastpipe

and I don't think these will work either:

	declare -A symbol_types
	declare -a export_symbols

A.


More information about the busybox mailing list