diff options
author | Aaron Walker <ka0ttic@gentoo.org> | 2005-04-08 15:56:39 +0000 |
---|---|---|
committer | Aaron Walker <ka0ttic@gentoo.org> | 2005-04-08 15:56:39 +0000 |
commit | b8aaa81bee6c71f8eaede4b501652e1c917be137 (patch) | |
tree | 9f861b1853283d457ae6a735ba97d3b6a90c78f2 | |
parent | Fix actionre (diff) | |
download | gentoo-bashcomp-b8aaa81bee6c71f8eaede4b501652e1c917be137.tar.gz gentoo-bashcomp-b8aaa81bee6c71f8eaede4b501652e1c917be137.tar.bz2 gentoo-bashcomp-b8aaa81bee6c71f8eaede4b501652e1c917be137.zip |
Add have() for local installations; bug 88326.
svn path=/trunk/; revision=37
-rw-r--r-- | gentoo | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -5,6 +5,15 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later +# also defined in bash_completion proper however, will produce command +# not found warnings when this is only enabled "locally" so we define it +# here as well. +have() +{ + unset -v have + PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 >&/dev/null && have="yes" +} + # # Retrieve PORTDIR/PORTDIR_OVERLAY location from user's make.conf or, if it # is not defined there, from make.globals. |