home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/python
-
- import sys
- import apt
- import os.path
-
-
- from optparse import OptionParser
- from GDebi.GDebi import GDebi
-
- from gettext import gettext as _
- import gettext
-
-
- if __name__ == "__main__":
- data="/usr/share/gdebi"
-
- localesApp="gdebi"
- localesDir="/usr/share/locale"
- gettext.bindtextdomain(localesApp, localesDir)
- gettext.textdomain(localesApp)
-
- parser = OptionParser()
- parser.add_option("-n", "--non-interactive",
- action="store_true", dest="non_interactive",
- default=False,
- help=_("Run non-interactive (dangerous!)"))
- (options, args) = parser.parse_args()
-
- if len(args) >= 1:
- app = GDebi(datadir=data,options=options,file=args[0])
- else:
- app = GDebi(datadir=data,options=options)
-
- if options.non_interactive == True:
- app.on_button_install_clicked(None)
- app.run()
-