From 11c868cf69cec041b836dce791bdf11114d1465e Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 24 Aug 2023 12:24:38 +0200 Subject: [PATCH] install.sh: Fix bee registery of /etc/files 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. --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index eb53244..fca5387 100755 --- a/install.sh +++ b/install.sh @@ -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()