Docs + README update

main
Michal 2 years ago
parent 1978c268f6
commit f6d97a3f03
No known key found for this signature in database
GPG Key ID: A6A1A4DCB22279B9

@ -20,33 +20,36 @@
<p align="center">Malachite is a simple yet useful workspace and local repository management tool, made for packagers of Arch Linux based distributions.</p>
## Basic usage
### Usage Guide
| Action | Command |
|--------------------------------------------------------|-----------------------|
| Build a package | mlc build \<package\> |
| 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 \<package\> [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 <package>/--all` to either build individual packages or all packages in mlc.toml
- `mlc build <package>` 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 \<name\>/\<name\>.db from built packages
## \>> [Detailed Usage Guide](docs/GETTING_STARTED.md) <<
## How to build:
Tested on latest Cargo (1.60.0-nightly)
<br>
#### Debug/development builds
### Debug/development builds
- `cargo build`
#### Optimised/release builds
### Optimised/release builds
- `cargo build --release`

@ -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!

Loading…
Cancel
Save