source: soft/build_system/build_system/repsys/tags/V1_6_7/RepSys/commands/getspec.py @ 1

Last change on this file since 1 was 1, checked in by fasma, 12 years ago

Initial Import from Mandriva's soft revision 224062 and package revision 45733

File size: 710 bytes
Line 
1#!/usr/bin/python
2from RepSys import Error
3from RepSys.command import *
4from RepSys.rpmutil import get_spec
5import getopt
6import sys
7
8HELP = """\
9Usage: repsys getspec [OPTIONS] REPPKGURL
10
11Options:
12    -t DIR  Use DIR as target for spec file (default is ".")
13    -h      Show this message
14
15Examples:
16    repsys getspec http://repos/svn/cnc/snapshot/foo
17"""
18
19def parse_options():
20    parser = OptionParser(help=HELP)
21    parser.add_option("-t", dest="targetdir", default=".")
22    opts, args = parser.parse_args()
23    if len(args) != 1:
24        raise Error, "invalid arguments"
25    opts.pkgdirurl = default_parent(args[0])
26    return opts
27
28def main():
29    do_command(parse_options, get_spec)
30
31# vim:et:ts=4:sw=4
Note: See TracBrowser for help on using the repository browser.