package/grep: fix egrep/fgrep shebang
authorAngelo Compagnucci <angelo@amarulasolutions.com>
Tue, 4 Feb 2020 14:24:47 +0000 (15:24 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 4 Feb 2020 14:53:24 +0000 (15:53 +0100)
commit8f9f48acd2db27863ca8fc0a4f1377aa2b07c886
treef3416646757e39ff0290034b16b2f14c9110e9ee
parent10bc79c612dd945af236f23e11b4df79b3c76257
package/grep: fix egrep/fgrep shebang

egrep/fgrep are wrapper scripts, calling the grep binary with the correct
arguments.

The shell wrappers use the value of SHELL at build time as the shebang value
in these wrapper scripts, which in Buildroot points to /bin/bash.

The target may not have bash available, causing runtime errors.

As a fix, add a post-install hook to change this to /bin/sh.

If the target does not have /bin/sh, simply remove the aliases.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/grep/Config.in
package/grep/grep.mk