Skip to content
Snippets Groups Projects
Commit ae6c160d authored by Filippo Cremonese's avatar Filippo Cremonese
Browse files

Added help for cli commands

parent eae4274d
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ from ..executor import Executor ...@@ -3,7 +3,7 @@ from ..executor import Executor
def install_subcommand(sub_argparser): def install_subcommand(sub_argparser):
cmd_parser = sub_argparser.add_parser("clone", handler=handle_clone) cmd_parser = sub_argparser.add_parser("clone", handler=handle_clone, help="Clone a component")
cmd_parser.add_argument("component") cmd_parser.add_argument("component")
cmd_parser.add_argument("--force", action="store_true", help="Force execution of the root action") cmd_parser.add_argument("--force", action="store_true", help="Force execution of the root action")
......
...@@ -3,7 +3,7 @@ from ..util import get_installed_build ...@@ -3,7 +3,7 @@ from ..util import get_installed_build
def install_subcommand(sub_argparser): def install_subcommand(sub_argparser):
cmd_parser = sub_argparser.add_parser("components", handler=handle_components) cmd_parser = sub_argparser.add_parser("components", handler=handle_components, help="List components")
cmd_parser.add_argument("component", nargs="?") cmd_parser.add_argument("component", nargs="?")
cmd_parser.add_argument("--installed", action="store_true", help="Only print installed components") cmd_parser.add_argument("--installed", action="store_true", help="Only print installed components")
cmd_parser.add_argument("--not-installed", action="store_true", help="Only print not installed components") cmd_parser.add_argument("--not-installed", action="store_true", help="Only print not installed components")
......
...@@ -3,7 +3,7 @@ from ..executor import Executor ...@@ -3,7 +3,7 @@ from ..executor import Executor
def install_subcommand(sub_argparser): def install_subcommand(sub_argparser):
cmd_parser = sub_argparser.add_parser("configure", handler=handle_configure) cmd_parser = sub_argparser.add_parser("configure", handler=handle_configure, help="Run configure script")
cmd_parser.add_argument("component") cmd_parser.add_argument("component")
cmd_parser.add_argument("--force", "-f", action="store_true", help="Force execution of the root action") cmd_parser.add_argument("--force", "-f", action="store_true", help="Force execution of the root action")
......
...@@ -2,7 +2,7 @@ from ..util import export_environment ...@@ -2,7 +2,7 @@ from ..util import export_environment
def install_subcommand(sub_argparser): def install_subcommand(sub_argparser):
cmd_parser = sub_argparser.add_parser("environment", handler=handle_environment) cmd_parser = sub_argparser.add_parser("environment", handler=handle_environment, help="Print environment variables")
cmd_parser.add_argument("component", nargs="?") cmd_parser.add_argument("component", nargs="?")
......
...@@ -2,7 +2,7 @@ from ..model.configuration import Configuration ...@@ -2,7 +2,7 @@ from ..model.configuration import Configuration
def install_subcommand(sub_argparser): def install_subcommand(sub_argparser):
cmd_parser = sub_argparser.add_parser("graph", handler=handle_graph) cmd_parser = sub_argparser.add_parser("graph", handler=handle_graph, help="Print dependency graph (dot format)")
cmd_parser.add_argument("component", nargs="?") cmd_parser.add_argument("component", nargs="?")
cmd_parser.add_argument("--all-builds", action="store_true", cmd_parser.add_argument("--all-builds", action="store_true",
help="Include all builds instead of only the default one.") help="Include all builds instead of only the default one.")
......
...@@ -3,7 +3,7 @@ from ..executor import Executor ...@@ -3,7 +3,7 @@ from ..executor import Executor
def install_subcommand(sub_argparser): def install_subcommand(sub_argparser):
cmd_parser = sub_argparser.add_parser("install", handler=handle_install) cmd_parser = sub_argparser.add_parser("install", handler=handle_install, help="Build and install a component")
cmd_parser.add_argument("component") cmd_parser.add_argument("component")
cmd_parser.add_argument("--force", "-f", action="store_true", help="Force execution of the root action") cmd_parser.add_argument("--force", "-f", action="store_true", help="Force execution of the root action")
cmd_parser.add_argument("--no-merge", action="store_true", help="Do not merge files into Orchestra root") cmd_parser.add_argument("--no-merge", action="store_true", help="Do not merge files into Orchestra root")
......
import os import os
import sys import pty
import select import select
import sys
import termios import termios
import tty import tty
import pty
from subprocess import Popen from subprocess import Popen
from ..actions.util import run_script
from ..model.configuration import Configuration from ..model.configuration import Configuration
from ..util import export_environment from ..util import export_environment
from ..actions.util import run_script
def install_subcommand(sub_argparser): def install_subcommand(sub_argparser):
cmd_parser = sub_argparser.add_parser("shell", handler=handle_shell) cmd_parser = sub_argparser.add_parser("shell", handler=handle_shell,
help="Open a shell with the given component environment (experimental)")
cmd_parser.add_argument("component", nargs="?") cmd_parser.add_argument("component", nargs="?")
...@@ -63,7 +64,7 @@ def handle_shell(args, config: Configuration): ...@@ -63,7 +64,7 @@ def handle_shell(args, config: Configuration):
buf += o buf += o
o = b"" o = b""
if b"READY" in buf: if b"READY" in buf:
o = buf[buf.rfind(b"READY")+5:] o = buf[buf.rfind(b"READY") + 5:]
prelude_passed = True prelude_passed = True
if o: if o:
os.write(sys.stdout.fileno(), o) os.write(sys.stdout.fileno(), o)
......
...@@ -6,7 +6,7 @@ from ..actions.install import uninstall ...@@ -6,7 +6,7 @@ from ..actions.install import uninstall
def install_subcommand(sub_argparser): def install_subcommand(sub_argparser):
cmd_parser = sub_argparser.add_parser("uninstall", handler=handle_uninstall) cmd_parser = sub_argparser.add_parser("uninstall", handler=handle_uninstall, help="Uninstall a component")
cmd_parser.add_argument("component") cmd_parser.add_argument("component")
......
...@@ -8,7 +8,7 @@ from ..model.configuration import Configuration ...@@ -8,7 +8,7 @@ from ..model.configuration import Configuration
def install_subcommand(sub_argparser): def install_subcommand(sub_argparser):
cmd_parser = sub_argparser.add_parser("update", handler=handle_update) cmd_parser = sub_argparser.add_parser("update", handler=handle_update, help="Update components")
def handle_update(args, config: Configuration): def handle_update(args, config: Configuration):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment