From bee003d419f0216cdbe37cb6d69e0faaf20c7299 Mon Sep 17 00:00:00 2001 From: Mihai Todor Date: Mon, 26 Aug 2024 16:35:10 +0100 Subject: [PATCH] Retain benthos as the binary name Signed-off-by: Mihai Todor --- bin/install | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/install b/bin/install index c7df6db..9ffad1f 100755 --- a/bin/install +++ b/bin/install @@ -71,7 +71,8 @@ install_benthos() { # Which OS and version? # ######################### - benthos_bin="redpanda-connect" + redpanda_connect_bin="redpanda-connect" + benthos_bin="benthos" benthos_dl_ext=".tar.gz" # NOTE: `uname -m` is more accurate and universal than `arch` @@ -110,6 +111,7 @@ install_benthos() { # Should catch cygwin sudo_cmd="" benthos_os="windows" + redpanda_connect_bin=$redpanda_connect_bin.exe benthos_bin=$benthos_bin.exe else echo "Aborted, unsupported or unknown os: $unameu" @@ -132,16 +134,16 @@ install_benthos() { echo "Extracting..." case "$benthos_file" in - *.tar.gz) tar -xzf "$dl" -C "$PREFIX/tmp/" "$benthos_bin" ;; + *.tar.gz) tar -xzf "$dl" -C "$PREFIX/tmp/" "$redpanda_connect_bin" ;; esac - chmod +x "$PREFIX/tmp/$benthos_bin" + chmod +x "$PREFIX/tmp/$redpanda_connect_bin" echo "Putting benthos in $benthos_install_path (may require password)" if [ -n "$sudo_cmd" ] && [ -n "$(find "$benthos_install_path" -prune -user "$(id -u)")" ]; then # Skip sudo if the current user is the owner of the Benthos install path sudo_cmd="" fi - $sudo_cmd mv "$PREFIX/tmp/$benthos_bin" "$benthos_install_path/$benthos_bin" + $sudo_cmd mv "$PREFIX/tmp/$redpanda_connect_bin" "$benthos_install_path/$benthos_bin" $sudo_cmd rm -- "$dl" # check installation