home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / bin / update-manager < prev    next >
Encoding:
Text File  |  2006-08-24  |  2.0 KB  |  65 lines

  1. #!/usr/bin/python
  2. # update-manager.in - easy updating application
  3. #  
  4. #  Copyright (c) 2004 Canonical
  5. #                2004 Michiel Sikkes
  6. #  
  7. #  Author: Michiel Sikkes <michiel@eyesopened.nl>
  8. #          Michael Vogt <mvo@debian.org>
  9. #  This program is free software; you can redistribute it and/or 
  10. #  modify it under the terms of the GNU General Public License as 
  11. #  published by the Free Software Foundation; either version 2 of the
  12. #  License, or (at your option) any later version.
  13. #  This program is distributed in the hope that it will be useful,
  14. #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. #  GNU General Public License for more details.
  17. #  You should have received a copy of the GNU General Public License
  18. #  along with this program; if not, write to the Free Software
  19. #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  20. #  USA
  21.  
  22. import pygtk
  23. import os
  24. pygtk.require('2.0')
  25. import gtk
  26. import gtk.glade
  27. import sys
  28.  
  29. from UpdateManager.UpdateManager import UpdateManager
  30. import gettext
  31. from gettext import gettext as _
  32.  
  33. from optparse import OptionParser
  34.  
  35. if __name__ == "__main__":
  36.   _ = gettext.gettext
  37.  
  38.   APP="update-manager"
  39.   DIR="/usr/share/locale"
  40.  
  41.   gettext.bindtextdomain(APP, DIR)
  42.   gettext.textdomain(APP)
  43.   gtk.glade.bindtextdomain(APP, DIR)
  44.   gtk.glade.textdomain(APP)
  45.  
  46.   # Begin parsing of options
  47.   parser = OptionParser()
  48.   parser.add_option ("-c", "--check-dist-upgrades", action="store_true",
  49.                      dest="check_dist_upgrades", default=False,
  50.                      help="Check if a new distribution release is available")
  51.   parser.add_option ("-d", "--devel-release", action="store_true",
  52.                      dest="devel_release", default=False,
  53.                      help="Check if upgrading to the latest devel release "
  54.                           "is possible")
  55.  
  56.   (options, args) = parser.parse_args()
  57.  
  58.   data_dir="/usr/share/update-manager/"
  59.   #data_dir="/tmp/xxx/share/update-manager/"
  60.   app = UpdateManager(data_dir)
  61.   app.main(options)
  62.