|
| From: | Francesco Potortì |
| Subject: | [Octave-bug-tracker] [bug #49156] No easy way to check whether a package is installed |
| Date: | Thu, 22 Sep 2016 11:11:00 +0000 (UTC) |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0 |
Follow-up Comment #1, bug #49156 (project octave):
Something like
## Check whether a package is installed
function ret = pkginstalled(package)
l = pkg('list'); # list of installed packages
ret = any(arrayfun((@(x)strcmp(x{}.name, package)), l));
endfunction
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49156>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
| [Prev in Thread] | Current Thread | [Next in Thread] |