aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/commands/githubimport.py
blob: afc73c5ab68f8af0f7ecd545b7da32dceff918b9 (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
29
30
31
32
33
#!/usr/bin/python
from MgaRepo import Error
from MgaRepo.command import *
from MgaRepo.GitHub import GitHub
import getopt
import sys

HELP = """\
Usage: mgarepo github-import [OPTIONS] URL

Import a git-svn cloned repository to github

Options:
    -h      Show this message

Examples:
    mgarepo githubimport existingpkg
    mgarepo githubimport svn+ssh://svn.mageia.org/svn/packages/cauldron/existingpkg
"""

def githubimport(target="."):
    github = GitHub()
    github.import_package(target)

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

def main():
    do_command(parse_options, githubimport)

# vim:et:ts=4:sw=4