diff --git a/README.md b/README.md index 00853ed..0182001 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ analysis, go to [`benchmarks`](benchmarks). ## Installation Requirements These are the versions I have tested the installation with. Older versions may also work. You may not need all of these, depending on how and what you are installing +* CMake ≥ 3.22 * cURL ≥ 7.68.0 * GCC ≥ 9.4.0 or Clang ≥ 12.0.0 * Git ≥ 2.30.2 @@ -34,13 +35,13 @@ The installation commands mentioned below must be entered in ## Install for C (and C++) ```shell -curl https://raw.githubusercontent.com/tfpf/hash-drbg/main/install.sh | sh +curl https://raw.githubusercontent.com/tfpf/hash-drbg/main/run.sh | sh ``` or ```shell git clone https://github.com/tfpf/hash-drbg.git cd hash-drbg -./install.sh +./run.sh ``` ### Quick Start diff --git a/install.sh b/install.sh deleted file mode 100755 index d513785..0000000 --- a/install.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /usr/bin/env sh - -if [ "$0" = sh ] -then - target=/tmp/hash-drbg-$(date +%s) - git clone https://github.com/tfpf/hash-drbg.git $target - cd $target -fi -mkdir -p build && cd build -cmake .. -sudo make --jobs=4 install diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..dbe086c --- /dev/null +++ b/run.sh @@ -0,0 +1,26 @@ +#! /usr/bin/env sh + +if [ "$1" = uninstall ] +then + im=build/install_manifest.txt + if [ ! -f $im ] + then + printf "Cannot find install manifest!\n" >&2 + exit 1 + fi + while read fname + do + sudo rm $fname + done < $im + exit +fi + +if [ "$0" = sh ] +then + target=/tmp/hash-drbg-$(date +%s) + git clone https://github.com/tfpf/hash-drbg.git $target + cd $target +fi +mkdir -p build && cd build +cmake .. +sudo make --jobs=4 install