Add "mode" parameter to add_binary
Some times add_binary
is used to add non-binaries. Most of the time it's unintentional, but since there's now a special behaviour for scripts that warns if the interpreter is missing, it may now be desirable to add scripts with add_binary
instead of add_file
.
The particular case that comes to mind is add_runscript
:
add_file "$script" "/hooks/$hookname" 755
That could be replaced with add_binary
to produce warnings if /usr/bin/ash
is missing (i.e. if the base hook
or something else is missing).
Since runtime hook are not stored executable, we need add_binary
to implement support for a third parameter for mode.