home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / bin / gdebi-gtk < prev    next >
Encoding:
Text File  |  2006-08-04  |  909 b   |  38 lines

  1. #!/usr/bin/python
  2.  
  3. import sys
  4. import apt
  5. import os.path
  6.  
  7.  
  8. from optparse import OptionParser
  9. from GDebi.GDebi import GDebi
  10.  
  11. from gettext import gettext as _
  12. import gettext
  13.  
  14.  
  15. if __name__ == "__main__":
  16.     data="/usr/share/gdebi"
  17.  
  18.     localesApp="gdebi"
  19.     localesDir="/usr/share/locale"
  20.     gettext.bindtextdomain(localesApp, localesDir)
  21.     gettext.textdomain(localesApp)
  22.  
  23.     parser = OptionParser()
  24.     parser.add_option("-n", "--non-interactive",
  25.                       action="store_true", dest="non_interactive",
  26.                       default=False,
  27.                       help=_("Run non-interactive (dangerous!)"))
  28.     (options, args) = parser.parse_args()
  29.  
  30.     if len(args) >= 1:
  31.         app = GDebi(datadir=data,options=options,file=args[0])
  32.     else:
  33.         app = GDebi(datadir=data,options=options)
  34.  
  35.     if options.non_interactive == True:
  36.         app.on_button_install_clicked(None)
  37.     app.run()
  38.