From 6aa6cfc7ff7d9e51eabb7df3eb861611830a6bd6 Mon Sep 17 00:00:00 2001
From: Louis Capitanchik <contact@louiscap.co>
Date: Mon, 8 Aug 2022 00:52:19 +0100
Subject: [PATCH] Update readme with from-source installation instructions

---
 README.md         | 23 +++++++++++++++++++++++
 source-install.sh |  6 ++++++
 2 files changed, 29 insertions(+)
 create mode 100644 source-install.sh

diff --git a/README.md b/README.md
index e4ff17d..5bbe340 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 0000000..c632ff2
--- /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
-- 
GitLab