$ head /usr/bin/quoter_pipe.sh #!/bin/sh This line is only for editors: This file must be sourced # This file is part of quoter v2.0 and distributed under the MIT license /usr/bin is for executable programs, not shell script libraries. Put it somewhere in /usr/lib.
/usr/lib is not for shell script libraries either. Neither is /usr/share. It is the same problem as with bug 598527 and bug 493000: These tools are meant to be used (easily) by user-written scripts, in case of push.sh and quoter_pipe.sh especially by scripts which are meant to be very compatible, i.e. to run unmodified on many different systems. Unfortunately, neither FHS nor POSIX does specify any compatible way how to handle shell script libraries. However, the POSIX definition of PATH being searched for sourcing, even if the file is non-executable, hints that putting it into PATH is the intended way to handle such libraries. In fact, I was even thinking about recommending to make these scripts executable, so that users can test in scripts with command -v quoter_pipe.sh >/dev/null 2>&1 in a semi-compatible way whether the tool is installed, but I decided against it, because it would "pollute" the completion function of some shells.
commit 1f2c76f541de6c0d4248abbddb2553c85273c0bb Author: Michael Weber <xmw@gentoo.org> Date: Fri Feb 10 10:14:24 2017 +0100 app-shells/quoter: Move quoter_pipe.sh into /usr/share/quoter (bug 598529). Package-Manager: Portage-2.3.3, Repoman-2.3.1 app-shells/quoter/quoter-3.0_p2-r1.ebuild