diff --git a/README.md b/README.md index fe96a5a..00e8801 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,29 @@ # Indivisible -Indivisible is an optimized prime number generator and tester written in Rust. +Indivisible is an optimized prime number generator and tester. ## Build & Installation -To build the project you will require the Rust compiler and build -system, `cargo`. At which point you simply run `cargo build` in the root -directory of the project. To create an optimized release build append -the `--release` flag to the previous command. +Build a binary release using the following command: -Once a release build has been compiled, you may install Indivisible and -the manpage documentation by running the `install` script. In a similar -manner, you can run the `uninstall` script to remove the previously -installed binary and documentation. +```console +$ cargo build -r +``` -## Usage +Once compiled, you can install it using the `install` script. By default this +will install to `/usr/local/{bin,share}`, but you can optionally change the +`PREFIX` used as follows: -The purpose of Indivisible is to find the nth prime and all the primes -before it. The basic usage is `indivisible ` where `n` is the ordinal -of the prime you'd like to find. To display all primes before `n`, you -can run verbose mode by using the `--verbose` or simply `-v` option. +```console +$ PREFIX="~/.local" ./install +``` -Since Indivisible generates primes using previously computed primes, you -can also import prime numbers previously computed with the `--import` or -`-i` option. To store already computed primes you are expected to use -piping like any UNIX user would expect. Here is an example: +Additionally there is an `uninstall` script available. If you have used a custom +`PREFIX` this must also be specified to uninstall in the same manner. To see +where you've installed it you can always use the following command: -```bash -# store first 100 primes in ./primes -indivisible -v 100 > ./primes -# appends next 400 primes -indivisible -i ./primes -v 500 >> ./primes -# display the 600th prime -indivisible -i ./primes 600 +```console +$ which indivisible ``` ## Legacy