aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/commands/upload.py
blob: dfcae5dc5d00c19dd40611f4a689ee2236724bec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from MgaRepo import Error
from MgaRepo.command import *
from MgaRepo.rpmutil import upload

HELP = """\
Usage: mgarepo upload [OPTIONS] [PATH]

Upload a given file to the binary sources repository.

It will also update the contents of the 'binrepo.lst' file and leave it
uncommited.

If the path is a directory, all the contents of the directory will be
uploaded or removed.

Options:
    -h      help

"""

def parse_options():
    parser = OptionParser(help=HELP)
    opts, args = parser.parse_args()
    opts.paths = args
    return opts

def main():
    do_command(parse_options, upload)