|
Revision 337, 1.2 kB
(checked in by asterix, 4 years ago)
|
|
core folder is now named Core (we can't have a core folder to build a debian package)
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | import logging |
|---|
| 21 | logging.basicConfig() |
|---|
| 22 | |
|---|
| 23 | import common |
|---|
| 24 | import Core |
|---|
| 25 | |
|---|
| 26 | from common import i18n |
|---|
| 27 | i18n.init() |
|---|
| 28 | _ = i18n._ |
|---|
| 29 | |
|---|
| 30 | import getopt, sys |
|---|
| 31 | |
|---|
| 32 | def usage(): |
|---|
| 33 | print "usage :", sys.argv[0], ' [OPTION]' |
|---|
| 34 | print " -c\tlaunch Gajim as a client of a Gajim server" |
|---|
| 35 | print " -h, --help\tdisplay this help and exit" |
|---|
| 36 | |
|---|
| 37 | try: |
|---|
| 38 | opts, args = getopt.getopt(sys.argv[1:], "ch", ["help"]) |
|---|
| 39 | except getopt.GetoptError: |
|---|
| 40 | |
|---|
| 41 | usage() |
|---|
| 42 | sys.exit(2) |
|---|
| 43 | mode = 'server' |
|---|
| 44 | for o, a in opts: |
|---|
| 45 | if o == '-c': |
|---|
| 46 | mode = 'client' |
|---|
| 47 | if o in ("-h", "--help"): |
|---|
| 48 | usage() |
|---|
| 49 | sys.exit() |
|---|
| 50 | |
|---|
| 51 | Core.core.start(mode) |
|---|
| 52 | print _("Core Stopped") |
|---|