aboutsummaryrefslogtreecommitdiffhomepage
path: root/get_argv.py
blob: b844db2070f863e8511668635f2cedcf8512de0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os
import sys
import getopt

config_dir = os.path.join(os.path.dirname(__file__), 'data/')
no_update = False

try:
    opts, args = getopt.getopt(sys.argv[1:],"h:",["no-update", "config="])
except getopt.GetoptError:
    print 'bazarr.py -h --no-update --config <config_directory>'
    sys.exit(2)
for opt, arg in opts:
    if opt == '-h':
        print 'bazarr.py -h --no-update --config <config_directory>'
        sys.exit()
    elif opt in ("--no-update"):
        no_update = True
    elif opt in ("--config"):
        config_dir = arg