diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-01-06 14:51:53 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-01-06 14:51:53 +0000 |
commit | d62a7f9774d9df9ce29e56dbecbab2f520fc3be5 (patch) | |
tree | b3350af8c7bd48ba75eafd2e8641ad1e278d8e4a /RepSys/commands/sync.py | |
download | mgarepo-d62a7f9774d9df9ce29e56dbecbab2f520fc3be5.tar mgarepo-d62a7f9774d9df9ce29e56dbecbab2f520fc3be5.tar.gz mgarepo-d62a7f9774d9df9ce29e56dbecbab2f520fc3be5.tar.bz2 mgarepo-d62a7f9774d9df9ce29e56dbecbab2f520fc3be5.tar.xz mgarepo-d62a7f9774d9df9ce29e56dbecbab2f520fc3be5.zip |
To avoid confusion, Mageia repsys fork is being renamed to mgarepo1.9
Diffstat (limited to 'RepSys/commands/sync.py')
-rw-r--r-- | RepSys/commands/sync.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/RepSys/commands/sync.py b/RepSys/commands/sync.py new file mode 100644 index 0000000..b4bdaba --- /dev/null +++ b/RepSys/commands/sync.py @@ -0,0 +1,38 @@ +#!/usr/bin/python +from RepSys.command import * +from RepSys.rpmutil import sync + +HELP = """\ +Usage: repsys sync + +Will add or remove from the working copy those files added or removed +in the spec file. + +It will not commit the changes. + +Options: + -c Commit the changes, as in ci + --dry-run Print results without changing the working copy + --download -d + Try to download the source files not found + -h Show this message + +Examples: + repsys sync +""" + +def parse_options(): + parser = OptionParser(help=HELP) + parser.add_option("--dry-run", dest="dryrun", default=False, + action="store_true") + parser.add_option("-c", dest="ci", default=False, + action="store_true") + parser.add_option("-d", "--download", dest="download", default=False, + action="store_true") + opts, args = parser.parse_args() + if len(args): + opts.target = args[0] + return opts + +def main(): + do_command(parse_options, sync) |