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.

Make the loop run in the main shell process.
  • Loading branch information
donald committed Aug 24, 2023
1 parent 20ed3ef commit 11c868c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ function install_symlink()

function install_etc_files()
{
(cd etc ; find * -type f) | while read -r path; do
while read -r path; do
if [[ -x etc/$path ]]; then
install_exec etc/$path "$DESTDIR$sysconfdir/$path"
else
install_data etc/$path "$DESTDIR$sysconfdir/$path"
fi
done
done < <(cd etc ; find * -type f)
}

function postinstall()
Expand Down

0 comments on commit 11c868c

Please sign in to comment.