commit: 5016bc0e375b70c576539812c7c1d110a49bd5c6 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sun Jan 4 09:59:13 2015 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Sun Jan 4 09:59:13 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=5016bc0e
opengl: write section to xorg.conf.d only if non-empty Write the "Files" section only if there's at least one ModulePath to write. The empty section isn't necessary and blocks processing other "Files" sections. --- modules/opengl.eselect | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/opengl.eselect b/modules/opengl.eselect index 6e3df4f..bdb387b 100644 --- a/modules/opengl.eselect +++ b/modules/opengl.eselect @@ -66,11 +66,13 @@ get_implementations() { # outputs the file contents to stderr write_xorg_confd() { local dir - echo 'Section "Files"' - for dir; do - echo " ModulePath \"${dir}\"" - done - echo 'EndSection' + if [[ -n ${@} ]]; then + echo 'Section "Files"' + for dir; do + echo " ModulePath \"${dir}\"" + done + echo 'EndSection' + fi } set_new_implementation() {