From e50d5e939de5b9d5ec65af2e1790a0041f8c2434 Mon Sep 17 00:00:00 2001 From: Neil O'Toole Date: Sat, 19 Nov 2022 23:43:18 -0700 Subject: [PATCH] README update; fleshed out install.sh --- README.md | 30 ++++++++++++++---------------- install.sh | 3 +++ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 93df8879..23bb12d0 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,13 @@ or dropping tables. ## Install -For other installation options, see [here](https://github.com/neilotoole/sq/wiki/Home#Install). +For other installation options, see [here](https://github.com/neilotoole/sq/wiki#install). It is strongly advised to install [shell completion](#shell-completion). ### macOS -```shell script +```shell brew install neilotoole/sq/sq ``` @@ -35,30 +35,28 @@ scoop install sq ### Linux -#### apt +#### install.sh -```shell script -curl -fsSLO https://github.com/neilotoole/sq/releases/latest/download/sq-linux-amd64.deb && sudo apt install -y ./sq-linux-amd64.deb && rm ./sq-linux-amd64.deb +The easiest method is to use [install.sh](./install.sh): + +```shell +$ /bin/sh -c "$(curl -fsSL https://sq.io/install.sh)" ``` -#### rpm +The script detects if any of `apt`, `yum`, or `brew` are installed, and +then installs via the usual procedure. -```shell script -sudo rpm -i https://github.com/neilotoole/sq/releases/latest/download/sq-linux-amd64.rpm -``` +> Note that `https://sq.io/install.sh` is simply a redirect to [https://raw.githubusercontent.com/neilotoole/sq/master/install.sh](https://raw.githubusercontent.com/neilotoole/sq/master/install.sh). -#### yum - -```shell script -yum localinstall -y https://github.com/neilotoole/sq/releases/latest/download/sq-linux-amd64.rpm -``` +You can of course directly use `apt`, `yum` etc. if desired. See the +wiki for [more installation options](https://github.com/neilotoole/sq/wiki#install). ## Shell completion Shell completion is available for `bash`, `zsh`, `fish`, and `powershell`. -It is strongly recommended to install. +It is strongly recommended to install it. -Execute `sq completion --help` for installation instructions. +Execute `sq completion --help` for the procedure. ## Quickstart diff --git a/install.sh b/install.sh index c13c4668..1111b62f 100755 --- a/install.sh +++ b/install.sh @@ -7,6 +7,7 @@ apt --version >/dev/null 2>&1 if [ "$?" -eq "0" ]; then set -e echo "Using apt to install sq..." + echo "" apt update -y && apt install -y --no-upgrade curl gpg @@ -31,6 +32,7 @@ yum version >/dev/null 2>&1 if [ "$?" -eq "0" ]; then set -e echo "Using yum to install sq..." + echo "" cat < /etc/yum.repos.d/sq.repo [sq] @@ -52,6 +54,7 @@ brew --version >/dev/null 2>&1 if [ "$?" -eq "0" ]; then set -e echo "Using brew to install sq..." + echo "" brew install neilotoole/sq/sq