From af08b364e4067244e071698c9d66dcc68be5d3c6 Mon Sep 17 00:00:00 2001 From: Nima Kaviani Date: Sun, 2 Jun 2024 00:20:48 -0700 Subject: [PATCH 1/4] add pipe to bash script Signed-off-by: Nima Kaviani --- README.md | 12 +++++++++--- hack/install.sh | 8 ++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100755 hack/install.sh diff --git a/README.md b/README.md index 9d434150..852f1477 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,19 @@ 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: +You can *carefully* run the following script to install `idpbuilder` + +``` +bash <(curl -fsSL https://raw.githubusercontent.com/cnoe-io/idpbuilder/main/hack/install.sh) +``` + +or download the latest release with the follwoing 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..4361d740 --- /dev/null +++ b/hack/install.sh @@ -0,0 +1,8 @@ +#!/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 From 447dac59cfdfda1305129740ed43f303f2020473 Mon Sep 17 00:00:00 2001 From: Nima Kaviani Date: Sun, 2 Jun 2024 21:11:38 -0700 Subject: [PATCH 2/4] fix the README msg Signed-off-by: Nima Kaviani --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 852f1477..164f5a91 100644 --- a/README.md +++ b/README.md @@ -36,13 +36,12 @@ If you are interested in running idpbuilder in Codespaces through your browser, ### Quick Install -You can *carefully* run the following script to install `idpbuilder` - +The following command can be used as a convenience for installing `idpbuilder`, (be sure to check the script first if you are concerned): ``` bash <(curl -fsSL https://raw.githubusercontent.com/cnoe-io/idpbuilder/main/hack/install.sh) ``` -or download the latest release with the follwoing commands: +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) From 8f742f351a1cc599c1180e39f02ab69cb629d2c2 Mon Sep 17 00:00:00 2001 From: Nima Kaviani Date: Sun, 2 Jun 2024 21:32:40 -0700 Subject: [PATCH 3/4] move to the bin folder Signed-off-by: Nima Kaviani --- hack/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hack/install.sh b/hack/install.sh index 4361d740..59156091 100755 --- a/hack/install.sh +++ b/hack/install.sh @@ -6,3 +6,5 @@ curl -L -o ./idpbuilder.tar.gz "https://github.com/cnoe-io/idpbuilder/releases/d tar xzf idpbuilder.tar.gz ./idpbuilder version + +sudo mv ./idpbuilder /usr/local/bin/ From b9a0af86a7414434417842784943bd511ca82612 Mon Sep 17 00:00:00 2001 From: Nima Kaviani Date: Mon, 3 Jun 2024 14:52:30 -0700 Subject: [PATCH 4/4] fix syntax Signed-off-by: Nima Kaviani --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 164f5a91..7e6a6ec2 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ If you are interested in running idpbuilder in Codespaces through your browser, The following command can be used as a convenience for installing `idpbuilder`, (be sure to check the script first if you are concerned): ``` -bash <(curl -fsSL https://raw.githubusercontent.com/cnoe-io/idpbuilder/main/hack/install.sh) +curl -fsSL https://raw.githubusercontent.com/cnoe-io/idpbuilder/main/hack/install.sh | bash ``` or download the latest release with the following commands: