From 33e74b9758e571355d00b2e911ea5a359001591a Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Fri, 5 Sep 2025 10:11:16 +0200 Subject: [PATCH 1/3] feat(install) Installation should now be taken from katenary.io --- install.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index b46c098..c86713f 100644 --- a/install.sh +++ b/install.sh @@ -10,6 +10,13 @@ set -e OS=$(uname) ARCH=$(uname -m) +for c in curl grep cut tr; do + if ! command -v $c >/dev/null 2>&1; then + echo "Error: $c is not installed" + exit 1 + fi +done + # Detect the home directory "bin" directory, it is commonly: # - $HOME/.local/bin # - $HOME/.bin @@ -43,20 +50,20 @@ if ! echo "$PATH" | grep -q "$INSTALL_PATH"; then fi # Where to download the binary -BASE="https://github.com/Katenary/katenary/releases/latest/download/" - +TAG=$(curl -sLf https://repo.katenary.io/api/v1/repos/katenary/katenary/releases/latest 2>/dev/null | grep -Po '"tag_name":\s*"[^"]*"' | cut -d ":" -f2 | tr -d '"') +TAG=3.0.0-rc7 # for compatibility with older ARM versions if [ $ARCH = "x86_64" ]; then ARCH="amd64" fi -BIN_URL="$BASE/katenary-$OS-$ARCH" +BIN_URL="https://repo.katenary.io/api/packages/Katenary/generic/katenary/$TAG/katenary-$OS-$ARCH" echo echo "Downloading $BIN_URL" T=$(mktemp -u) -curl -SL -# $BIN_URL -o $T || (echo "Failed to download katenary" && rm -f $T && exit 1) +curl -sLf -# $BIN_URL -o $T 2>/dev/null || (echo -e "Failed to download katenary version $TAG.\n\nPlease open an issue and explain the problem, following the link:\nhttps://repo.katenary.io/Katenary/katenary/issues/new?title=[install.sh]%20Install%20$TAG%20failed" && rm -f $T && exit 1) mv "$T" "${INSTALL_PATH}/katenary" chmod +x "${INSTALL_PATH}/katenary" -- 2.49.1 From aeff9215aae318c04cdafbc13790144decc0b1d7 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Sun, 14 Sep 2025 14:16:19 +0200 Subject: [PATCH 2/3] Fixup comments remove hard coded tagname --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index c86713f..e81398d 100644 --- a/install.sh +++ b/install.sh @@ -51,8 +51,8 @@ fi # Where to download the binary TAG=$(curl -sLf https://repo.katenary.io/api/v1/repos/katenary/katenary/releases/latest 2>/dev/null | grep -Po '"tag_name":\s*"[^"]*"' | cut -d ":" -f2 | tr -d '"') -TAG=3.0.0-rc7 -# for compatibility with older ARM versions + +# use the right names for the OS and architecture if [ $ARCH = "x86_64" ]; then ARCH="amd64" fi -- 2.49.1 From 584bcc60339437526110a80b07fdb1540d61ebf1 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Sun, 14 Sep 2025 14:18:53 +0200 Subject: [PATCH 3/3] Fix typo not important but... --- install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index e81398d..cf91fd7 100644 --- a/install.sh +++ b/install.sh @@ -4,8 +4,6 @@ # Can be launched with the following command: # sh <(curl -sSL https://raw.githubusercontent.com/Katenary/katenary/master/install.sh) -set -e - # Detect the OS and architecture OS=$(uname) ARCH=$(uname -m) @@ -21,10 +19,10 @@ done # - $HOME/.local/bin # - $HOME/.bin # - $HOME/bin -COMON_INSTALL_PATHS="$HOME/.local/bin $HOME/.bin $HOME/bin" +COMMON_INSTALL_PATHS="$HOME/.local/bin $HOME/.bin $HOME/bin" INSTALL_PATH="" -for p in $COMON_INSTALL_PATHS; do +for p in $COMMON_INSTALL_PATHS; do if [ -d $p ]; then INSTALL_PATH=$p break -- 2.49.1