From d59f2a5b5c37a4631cee797fc4ea79be5255f91e Mon Sep 17 00:00:00 2001 From: Rene Nyffenegger Date: Sat, 13 Jan 2024 12:09:30 +0100 Subject: [PATCH] DIVE_VERSION does not need to be exported The value of the variable DIVE_VERSION is not needed in a spawned subprocess. Thus, the variable does not necessarily need to be exported. Arguably, the environment is less polluted if it is not exported. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fd636be0..a334a2f7 100644 --- a/README.md +++ b/README.md @@ -95,14 +95,14 @@ With valid `source` options as such: **Ubuntu/Debian** ```bash -export DIVE_VERSION=$(curl -sL "https://api.github.com/repos/wagoodman/dive/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') +DIVE_VERSION=$(curl -sL "https://api.github.com/repos/wagoodman/dive/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') curl -OL https://github.com/wagoodman/dive/releases/download/v${DIVE_VERSION}/dive_${DIVE_VERSION}_linux_amd64.deb sudo apt install ./dive_${DIVE_VERSION}_linux_amd64.deb ``` **RHEL/Centos** ```bash -export DIVE_VERSION=$(curl -sL "https://api.github.com/repos/wagoodman/dive/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') +DIVE_VERSION=$(curl -sL "https://api.github.com/repos/wagoodman/dive/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') curl -OL https://github.com/wagoodman/dive/releases/download/v${DIVE_VERSION}/dive_${DIVE_VERSION}_linux_amd64.rpm rpm -i dive_${DIVE_VERSION}_linux_amd64.rpm ```