Mac OS X : how to check if tclsh is installed and, if not, install it?
I need to write a script which checks i开发者_运维百科f tclsh is installed on Mac OS if not install it.
In this case it is tclsh but generally the applications can be random.
I'm checking if the package (tclsh) is installed or not using pkgutil --pkgs command. But this does not show tclsh in the returned list (although tclsh is available in system).
So how do I check if the tclsh is installed on system from command line and install it in case it is not installed.
In bash, you'd run type -a tclsh
. You might also try locate tclsh
.
However, if you're distributing a Tcl program, you might want to investigate building a Starkit -- a self contained, one-file application. See Build Your First Starkit
精彩评论