From f6d97a3f030ffe3ed4dc7e10004ff59db34c8d06 Mon Sep 17 00:00:00 2001 From: Michal Date: Sat, 23 Jul 2022 02:29:33 +0100 Subject: [PATCH] Docs + README update --- README.md | 29 ++++++++++++++++------------- docs/COMMON_FEATURES.md | 20 +++++++------------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 4988b75..3222526 100644 --- a/README.md +++ b/README.md @@ -20,33 +20,36 @@

Malachite is a simple yet useful workspace and local repository management tool, made for packagers of Arch Linux based distributions.

-## Basic usage +### Usage Guide -| Action | Command | -|--------------------------------------------------------|-----------------------| -| Build a package | mlc build \ | -| Generate local repository | mlc repo-gen | -| Update local repos/PKGBUILDs | mlc pull/update | -| Create and/or open config file | mlc conf | -| Initialises repo/workspace based on config in mlc.toml | mlc clone/init | +| Action | Command | +|--------------------------------------------------------|-------------------------------------------| +| Build a package | mlc build \ [all if left empty] | +| Generate local repository | mlc repo-gen | +| Update local repos/PKGBUILDs | mlc pull/update [all if left empty] | +| Create and/or open config file | mlc conf | +| Initialises repo/workspace based on config in mlc.toml | mlc clone/init | ### Pacman Repository Creation - `mlc config` to create the config (and also populate it) - `mlc init` to build repository base from config file -- `mlc build /--all` to either build individual packages or all packages in mlc.toml +- `mlc build ` to either build individual packages, or don't specify package names to build all packages in mlc.toml + - `build` typically automatically updates the repository unless `--no-regen` is passed, if so: - `mlc repo-gen` to generate functional pacman repository at \/\.db from built packages + +## \>> [Detailed Usage Guide](docs/GETTING_STARTED.md) << + + ## How to build: Tested on latest Cargo (1.60.0-nightly) -
- -#### Debug/development builds +### Debug/development builds - `cargo build` -#### Optimised/release builds +### Optimised/release builds - `cargo build --release` diff --git a/docs/COMMON_FEATURES.md b/docs/COMMON_FEATURES.md index 0e1365c..f1de5b4 100644 --- a/docs/COMMON_FEATURES.md +++ b/docs/COMMON_FEATURES.md @@ -60,9 +60,7 @@ smart_pull = true In this snippet, we define `mode` to be `"workspace"`. `base.mode` in Malachite can only ever be one of `"workspace"` or `"repository"`, and defines, drumroll... -The mode in which it operates. - -If it is set to anything but those 2 modes, it crashes. +The mode in which it operates. If it is set to anything but those 2 modes, it crashes. Also defined in this snippet is `smart_pull`, which controls whether or not to pull... smartly. @@ -77,7 +75,7 @@ will: Theoretically, this only actually speeds things up by a minute amount (think milliseconds, really). Where this feature shines however is in repository mode, where it enables helpful automation features such as `build_on_update`. -Either way, it's recommended to keep this enabled for the slight speedup, and only disable it if it causes issues. +Regardless, it's recommended to keep this enabled for the slight speedup, and only disable it if it causes issues. I've never personally had issues with it in the past, but who knows what could happen. This is Git we're talking about. @@ -101,15 +99,11 @@ urls = [ ] ``` -The way this works is simple. - -We have 2 urls in the `repositories.urls` key. - -Each `name` in the `repositories.name` key is prefixed with an index. - -If the number is `1`, it'll insert the name into the `1`st URL. - -Specifically, in the repo's URL, it'll insert the defined `name` in place of the `%repo%` substring. +The way this works is simple: +- We have 2 urls in the `repositories.urls` key. +- Each `name` in the `repositories.name` key is prefixed with an index. +- If the number is `N`, it'll insert the name into the `N`th URL. + - Specifically, in the repo's URL, it'll insert the defined `name` in place of the `%repo%` substring. That's literally it!