sync
This commit is contained in:
@@ -29,6 +29,15 @@ def main():
|
||||
put_parser.add_argument("sources", nargs="+", help="Lokale Quelldatei(en) oder Wildcards (z.B. *.raw)")
|
||||
put_parser.add_argument("target", type=str, help="Zielpfad auf dem Controller (Verzeichnis muss mit '/' enden)")
|
||||
|
||||
# Befehl: mkdir
|
||||
mkdir_parser = subparsers.add_parser("mkdir", help="Erstellt ein neues Verzeichnis")
|
||||
mkdir_parser.add_argument("path", type=str, help="Pfad des neuen Verzeichnisses (z.B. /lfs/a/neu)")
|
||||
|
||||
# Befehl: rm
|
||||
rm_parser = subparsers.add_parser("rm", help="Löscht eine Datei oder ein Verzeichnis")
|
||||
rm_parser.add_argument("path", type=str, help="Pfad der zu löschenden Datei/Ordner")
|
||||
rm_parser.add_argument("-r", "--recursive", action="store_true", help="Ordnerinhalte rekursiv löschen")
|
||||
|
||||
# Argumente parsen
|
||||
args = parser.parse_args()
|
||||
config = load_config(args)
|
||||
@@ -61,6 +70,10 @@ def main():
|
||||
ls.print_tree(tree, path=args.path )
|
||||
elif args.command == "put":
|
||||
put.execute(conn, sources=args.sources, target=args.target)
|
||||
elif args.command == "mkdir":
|
||||
mkdir.execute(conn, path=args.path)
|
||||
elif args.command == "rm":
|
||||
rm.execute(conn, path=args.path, recursive=args.recursive)
|
||||
elif args.command == "info" or args.command is None:
|
||||
# Wurde kein Befehl oder explizit 'info' angegeben, sind wir hier schon fertig
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user