Skip to content

Commit

Permalink
install.sh: Fix bee registery of /etc/files
Browse files Browse the repository at this point in the history
The function install_etc_files contains a bug which causes the files in
etc not to be probably registered in the crafted bee index of the
"mxtools-0.0-0" package.

The reason is, that the functions install_exe and install_data are
called from the last command of a pipeline. By default, this is executed
in a subshell, so the implicit modification of the global variable
INSTALLED_FILES is not seen by main process, which later uses it to
generate the index.

Use the "lastpipe" shell option, which makes the last command of a
pipeline run in the main shell process.
  • Loading branch information
donald committed Aug 24, 2023
1 parent 20ed3ef commit e2952e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ function install_symlink()

function install_etc_files()
{
shopt -s lastpipe
(cd etc ; find * -type f) | while read -r path; do
if [[ -x etc/$path ]]; then
install_exec etc/$path "$DESTDIR$sysconfdir/$path"
Expand Down

0 comments on commit e2952e9

Please sign in to comment.