diff --git a/README.md b/README.md index e4ff17d3a2590a29946ca7e4c5b25adb1c919b64..5bbe340b2947587d98043fda5f690838f18bb051 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,26 @@ SUBCOMMANDS: scale Make an image larger or smaller ``` + +## Downloads + +Linux: +- [Latest Release](https://lab.lcr.gr/microhacks/crunch/-/jobs/artifacts/trunk/raw/target/release/crunch?job=build-linux) + +## Build From Source + +You can simply download this repository and run `cargo build --release` to get a binary for your system. Using `--release` mode +is required in all situations, as the time taken to run a command with the debug build is _several_ orders of magnitude higher. + +If you use the `.local/bin` pattern for non-sudo userspace programs, you can use the included build script to simplify things. Otherwise, +follow the below instructions: + +**Simple Script** +- Clone this repository +- Run `sh source-install.sh` + +**Manual** +- Clone this repository +- Run `cargo build --release` +- Optionally, `strip` the binary +- Copy `target/release/crunch` to a folder located in your `$PATH` \ No newline at end of file diff --git a/source-install.sh b/source-install.sh new file mode 100644 index 0000000000000000000000000000000000000000..c632ff21647160abfd6eb9f01a8db3bcb65213b1 --- /dev/null +++ b/source-install.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +cargo build --release +strip release/target/crunch +chmod u+x release/target/crunch +cp release/target/crunch "$HOME/.local/bin/crunch" \ No newline at end of file