busybox: add '--show SCRIPT' option to display scripts

Add an option to allow the content of embedded scripts to be
displayed.  This includes applet scripts, custom scripts and the
.profile script.

function                                             old     new   delta
busybox_main                                         624     701     +77
find_script_by_name                                    -      24     +24
scripted_main                                         41      35      -6
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 101/-6)             Total: 95 bytes

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Ron Yorston
2018-11-18 19:12:26 +01:00
committed by Denys Vlasenko
parent 3778898f97
commit d1b2ae2d04
2 changed files with 59 additions and 38 deletions

View File

@@ -178,6 +178,11 @@ config BUSYBOX
Running "busybox APPLET [ARGS...]" will still work, of course.
config FEATURE_SHOW_SCRIPT
bool "Support --show SCRIPT"
default y
depends on BUSYBOX
config FEATURE_INSTALLER
bool "Support --install [-s] to install applet links at runtime"
default y