aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/commands/upload.py
diff options
context:
space:
mode:
Diffstat (limited to 'MgaRepo/commands/upload.py')
-rw-r--r--MgaRepo/commands/upload.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/MgaRepo/commands/upload.py b/MgaRepo/commands/upload.py
new file mode 100644
index 0000000..dfcae5d
--- /dev/null
+++ b/MgaRepo/commands/upload.py
@@ -0,0 +1,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)