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 |
---|
2 | from RepSys import Error |
---|
3 | from RepSys.command import * |
---|
4 | from RepSys.rpmutil import get_spec |
---|
5 | import getopt |
---|
6 | import sys |
---|
7 | |
---|
8 | HELP = """\ |
---|
9 | Usage: repsys getspec [OPTIONS] REPPKGURL |
---|
10 | |
---|
11 | Options: |
---|
12 | -t DIR Use DIR as target for spec file (default is ".") |
---|
13 | -h Show this message |
---|
14 | |
---|
15 | Examples: |
---|
16 | repsys getspec http://repos/svn/cnc/snapshot/foo |
---|
17 | """ |
---|
18 | |
---|
19 | def 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 | |
---|
28 | def 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.