Skip to content

Commit

Permalink
install.sh: Avoid find *
Browse files Browse the repository at this point in the history
Although the local `etc` directory should contain only sane files, stick
to good habit and avoid `find *`, which misinterpretes filenames
starting with `-`. Also add quotes to avoid missinterpretation of
filenames with whitespace.
  • Loading branch information
donald committed Aug 24, 2023
1 parent 11c868c commit af9dd1c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ function install_symlink()
function install_etc_files()
{
while read -r path; do
path="${path#./}"
if [[ -x etc/$path ]]; then
install_exec etc/$path "$DESTDIR$sysconfdir/$path"
install_exec "etc/$path" "$DESTDIR$sysconfdir/$path"
else
install_data etc/$path "$DESTDIR$sysconfdir/$path"
install_data "etc/$path" "$DESTDIR$sysconfdir/$path"
fi
done < <(cd etc ; find * -type f)
done < <(cd etc ; find ./* -type f)
}

function postinstall()
Expand Down

0 comments on commit af9dd1c

Please sign in to comment.