1
1
mirror of https://github.com/chubin/cheat.sh.git synced 2024-11-22 01:40:48 +03:00

Add checksum validation to readme

This commit is contained in:
dotcs 2022-05-03 09:05:13 +02:00
parent 571377f2f7
commit 96d9814532

View File

@ -209,16 +209,18 @@ has several useful features compared to querying the service directly with `curl
To install the client:
```bash
SHA256_CHECKSUM="d3135e42b800ff2e7aac44d4dfe500f0f4e2c7eb00a1c2191b0dc8b28431f155"
PATH_DIR="$HOME/bin" # or another directory on your $PATH
mkdir -p "$PATH_DIR"
curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
echo "$SHA256_CHECKSUM $PATH_DIR/cht.sh" | sha256sum --check -
chmod +x "$PATH_DIR/cht.sh"
```
or to install it globally (for all users):
```bash
curl -s https://cht.sh/:cht.sh | sudo tee /usr/local/bin/cht.sh && sudo chmod +x /usr/local/bin/cht.sh
curl -s https://cht.sh/:cht.sh | sudo tee /usr/local/bin/cht.sh 1>/dev/null && echo "d3135e42b800ff2e7aac44d4dfe500f0f4e2c7eb00a1c2191b0dc8b28431f155 /usr/local/bin/cht.sh" | sha256sum --check - && sudo chmod +x /usr/local/bin/cht.sh
```
Note: The package "rlwrap" is a required dependency to run in shell mode. Install this using `sudo apt install rlwrap`