#!/bin/sh
set -veuo pipefail

cd "$(dirname "$0")/.."

declare install_args=""
if [[ -n "${INSTALL_VERSION:=}" ]]; then
  install_args=" --version $INSTALL_VERSION"
fi

echo '```sh
$ cargo install save'"${install_args}"'
```

```sh
$ save --help
```

```text
'"$(NO_COLOR=NO MAX_TERM_WIDTH=70 cargo run -- --help)"'
```' > "./README.md"
