From c5aa90cd1eda91f1b3f06923fec3091c28b6c9b7 Mon Sep 17 00:00:00 2001 From: Nima Kaviani <17132353+nimakaviani@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:21:46 -0700 Subject: [PATCH] add pipe to bash script (#272) Signed-off-by: Nima Kaviani --- README.md | 11 ++++++++--- hack/install.sh | 10 ++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100755 hack/install.sh diff --git a/README.md b/README.md index 9d434150..7e6a6ec2 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,18 @@ A container engine is needed locally such as: **Note**: Set the `DOCKER_HOST` env var property using `podman` to let idpbuilder to talk with the engine (e.g export DOCKER_HOST="unix:///var/run/docker.sock") -## Quickstart +## Getting Started If you are interested in running idpbuilder in Codespaces through your browser, check out the [Codespaces](#running-in-codespaces) section. -### Download and install the idpbuilder +### Quick Install -Download the latest release with the commands: +The following command can be used as a convenience for installing `idpbuilder`, (be sure to check the script first if you are concerned): +``` +curl -fsSL https://raw.githubusercontent.com/cnoe-io/idpbuilder/main/hack/install.sh | bash +``` + +or download the latest release with the following commands: ```bash version=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/cnoe-io/idpbuilder/releases/latest) diff --git a/hack/install.sh b/hack/install.sh new file mode 100755 index 00000000..59156091 --- /dev/null +++ b/hack/install.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +version=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/cnoe-io/idpbuilder/releases/latest) +version=${version##*/} +curl -L -o ./idpbuilder.tar.gz "https://github.com/cnoe-io/idpbuilder/releases/download/${version}/idpbuilder-$(uname | awk '{print tolower($0)}')-$(uname -m | sed 's/x86_64/amd64/').tar.gz" +tar xzf idpbuilder.tar.gz + +./idpbuilder version + +sudo mv ./idpbuilder /usr/local/bin/