Added -V option to managedsoftwareupdate to print the version of the munki tools.

git-svn-id: http://munki.googlecode.com/svn/trunk@304 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2009-11-02 18:57:45 +00:00
parent ff664ddea3
commit 0e4bc73db9
+7
View File
@@ -189,9 +189,16 @@ def main():
help="Check for updates, but don't install them.")
p.add_option('--installonly', action='store_true',
help='Skip checking and install any pending updates.')
p.add_option('--version', '-V', action='store_true',
help='Print the version of the munki tools and exit.')
options, arguments = p.parse_args()
if options.version:
print munkicommon.version()
exit(0)
if options.auto:
# typically invoked by a launch daemon periodically
# munkistatusoutput is false for checking, but true for installing