diff options
-rwxr-xr-x | bin/just-lock.py | 11 | ||||
-rw-r--r-- | doc/future-designs/just-lock.md | 3 | ||||
-rw-r--r-- | share/man/just-lock.1.md | 4 |
3 files changed, 16 insertions, 2 deletions
diff --git a/bin/just-lock.py b/bin/just-lock.py index ddbbd21f..2b964b85 100755 --- a/bin/just-lock.py +++ b/bin/just-lock.py @@ -51,6 +51,7 @@ DEFAULT_INPUT_CONFIG_NAME: str = "repos.in.json" DEFAULT_JUSTMR_CONFIG_NAME: str = "repos.json" DEFAULT_CONFIG_DIRS: List[str] = [".", "./etc"] """Directories where to look for configuration file inside a root""" +DEFAULT_JUST: str = "just" GIT_NOBODY_ENV: Dict[str, str] = { "GIT_AUTHOR_DATE": "1970-01-01T00:00Z", @@ -77,6 +78,8 @@ class ObjectType(Enum): g_ROOT: str = DEFAULT_BUILD_ROOT """The configured local build root""" +g_JUST: str = DEFAULT_JUST +"""The path to the 'just' binary""" g_GIT: str = DEFAULT_GIT_BIN """Git binary to use""" g_LAUNCHER: List[str] = DEFAULT_LAUNCHER @@ -2097,6 +2100,10 @@ def main(): dest="local_build_root", help="Root for CAS, repository space, etc", metavar="PATH") + parser.add_argument("--just", + dest="just_bin", + help="Path to the 'just' binary", + metavar="PATH") parser.add_argument("--git", dest="git_bin", help="Git binary to use", @@ -2137,9 +2144,11 @@ def main(): os.path.join(parent_path, DEFAULT_JUSTMR_CONFIG_NAME)) # Process the rest of the command line; use globals for simplicity - global g_ROOT, g_GIT, g_LAUNCHER + global g_ROOT, g_JUST, g_GIT, g_LAUNCHER if args.local_build_root: g_ROOT = os.path.abspath(args.local_build_root) + if args.just_bin: + g_JUST = args.just_bin if args.git_bin: g_GIT = args.git_bin if args.launcher: diff --git a/doc/future-designs/just-lock.md b/doc/future-designs/just-lock.md index 61e3c900..e20817bf 100644 --- a/doc/future-designs/just-lock.md +++ b/doc/future-designs/just-lock.md @@ -103,7 +103,7 @@ Usage: generate/update a `just-mr` configuration file ``` just-lock [-C <repos.in.json>] [-o <repos.json>] - [--local-build-root <PATH>] + [--local-build-root <PATH>] [--just <PATH>] [--git <PATH>] [-L|--launcher <JSON>] [--clone <JSON>] @@ -114,6 +114,7 @@ OPTIONS: the workspace root. If none found, placed as 'repos.json' in parent path of input file. --local-build-root PATH Local build root. Usual `just-mr` rules apply. + --just PATH Path to a `just` binary. If missing, use the `just` name from PATH. --git PATH Git binary to use if needed. If missing, system `git` is used. User must pass it also to `just-mr`. --launcher JSON Local launcher to use for commands. Given as a JSON list of strings. diff --git a/share/man/just-lock.1.md b/share/man/just-lock.1.md index b4fa693c..bc272a9f 100644 --- a/share/man/just-lock.1.md +++ b/share/man/just-lock.1.md @@ -57,6 +57,10 @@ Root for local CAS, cache, and build directories. The path will be created if it does not exist already. Default: path *`".cache/just"`* in user's home directory. +**`--just`** *`PATH`* +Path to the **`just`** binary in *`PATH`* or path to the **`just`** binary. +Default: *`"just"`*. + **`-L`**, **`--local-launcher`** *`JSON_ARRAY`* JSON array with the list of strings representing the launcher to prepend any commands being executed locally. |