From 96e74f3058389b53eda172f5bebe1e6dd6460a56 Mon Sep 17 00:00:00 2001 From: Karolina Bogacka Date: Sun, 20 Jul 2025 19:06:42 +0200 Subject: [PATCH 01/13] Add an installation file --- install.sh | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100755 install.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..6969453 --- /dev/null +++ b/install.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +# This script installs the latest cli release from the GitHub repository +# Let's start by fetching the latest release information +REPO_BASE="https://api.github.com/repos/Jelly-RDF/cli" +REPO="$REPO_BASE/releases/latest" +RELEASE_INFO=$(curl -s $REPO) + +# And let's get the tag name of the latest release +TAG_NAME=$(echo $RELEASE_INFO | grep -o '"tag_name": "[^"]*' | sed 's/"tag_name": "//') +if [[ -z "$TAG_NAME" ]]; then + echo "Error: Could not fetch the latest release tag name." + exit 1 +fi + +# Check the operating system and architecture +OS=$(uname -s | tr '[:upper:]' '[:lower:]') +ARCH=$(uname -m) +# Map the architecture to the appropriate binary name +case $OS in + linux) BINARY_NAME="jelly-cli-linux" ;; + darwin) BINARY_NAME="jelly-cli-macos" ;; + *) echo "Unsupported operating system: $OS"; exit 1 ;; +esac +# Append the architecture to the binary name but yell for cases we don't support +case $ARCH in + x86_64) BINARY_NAME+="-amd64" ;; + aarch64) + # check that os not darwin here + if [[ "$OS" = "darwin" ]]; then + echo "Unsupported architecture: $ARCH on macOS" + exit 1 + fi + BINARY_NAME+="-arm64" ;; + *) echo "Unsupported architecture: $ARCH" + exit 1 + ;; +esac + +# Check the installation directory +INSTALL_DIR="$HOME/.local/bin" +if [[ ! -d "$INSTALL_DIR" ]]; then + echo "Creating installation directory: $INSTALL_DIR" + mkdir -p "$INSTALL_DIR" +fi + +# Ensure that the installation directory is in the PATH +if ! echo "$PATH" | grep -q "$INSTALL_DIR"; then + echo "Adding $INSTALL_DIR to PATH" + # Check shell config file from bash and zsh + if [[ "$SHELL" == *"zsh"* ]]; then + echo "export PATH=\"\$PATH:$INSTALL_DIR\"" >> "$HOME/.zshrc" + elif [[ "$SHELL" == *"bash"* ]]; then + echo "export PATH=\"\$PATH:$INSTALL_DIR\"" >> "$HOME/.bashrc" + fi +fi + + +# Download the binary +DOWNLOAD_URL="$REPO_BASE/releases/download/$TAG_NAME/$BINARY_NAME" +echo "Downloading $BINARY_NAME from $DOWNLOAD_URL" +curl -L "$DOWNLOAD_URL" -o "$INSTALL_DIR/jelly-cli" +chmod +x "$INSTALL_DIR/jelly-cli" + +# Link the binary to the installation directory +if [[ -f "$INSTALL_DIR/jelly-cli" ]]; then + echo "Installation successful! You can now use Jelly CLI by running 'jelly-cli'." +else + echo "Error: Installation failed. The binary was not found in the installation directory." + exit 1 +fi + +# Check if zsh or bash is being used and source the appropriate file +if [[ "$SHELL" == *"zsh"* ]]; then + echo 'Run source "$HOME/.zshrc" or restart your terminal to apply changes.' +elif [[ "$SHELL" == *"bash"* ]]; then + echo 'Run source "$HOME/.bashrc" or restart your terminal to apply changes.' +fi + + From 6ab937c020e24b231fe38148a7c0135209f2825c Mon Sep 17 00:00:00 2001 From: Karolina Bogacka Date: Sun, 20 Jul 2025 19:42:37 +0200 Subject: [PATCH 02/13] Fix an URL generation bug --- install.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 6969453..e826cf9 100755 --- a/install.sh +++ b/install.sh @@ -2,8 +2,8 @@ # This script installs the latest cli release from the GitHub repository # Let's start by fetching the latest release information -REPO_BASE="https://api.github.com/repos/Jelly-RDF/cli" -REPO="$REPO_BASE/releases/latest" +REPO_BASE="Jelly-RDF/cli" +REPO="https://api.github.com/repos/$REPO_BASE/releases/latest" RELEASE_INFO=$(curl -s $REPO) # And let's get the tag name of the latest release @@ -24,7 +24,7 @@ case $OS in esac # Append the architecture to the binary name but yell for cases we don't support case $ARCH in - x86_64) BINARY_NAME+="-amd64" ;; + x86_64) BINARY_NAME+="-x86_64" ;; aarch64) # check that os not darwin here if [[ "$OS" = "darwin" ]]; then @@ -55,13 +55,17 @@ if ! echo "$PATH" | grep -q "$INSTALL_DIR"; then fi fi +# Add the binary to the PATH for the current session +export PATH="$PATH:$INSTALL_DIR" + # Download the binary -DOWNLOAD_URL="$REPO_BASE/releases/download/$TAG_NAME/$BINARY_NAME" +DOWNLOAD_URL="https://github.com/$REPO_BASE/releases/download/$TAG_NAME/$BINARY_NAME" echo "Downloading $BINARY_NAME from $DOWNLOAD_URL" curl -L "$DOWNLOAD_URL" -o "$INSTALL_DIR/jelly-cli" chmod +x "$INSTALL_DIR/jelly-cli" + # Link the binary to the installation directory if [[ -f "$INSTALL_DIR/jelly-cli" ]]; then echo "Installation successful! You can now use Jelly CLI by running 'jelly-cli'." From 3d0e7a837858ee275f5028b5609d44beb5c19498 Mon Sep 17 00:00:00 2001 From: Karolina Bogacka Date: Sun, 20 Jul 2025 20:02:37 +0200 Subject: [PATCH 03/13] Add changes to README --- README.md | 35 ++++++++++++++++++++++------------- install.sh | 12 ++++++------ 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 10adbf2..31025fd 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,16 @@ Fast and convenient CLI utility for working with the [Jelly](https://jelly-rdf.g ## Quick start -If you are using Linux (x86_64, ARM64), macOS (ARM64), or Windows (x86_64), the recommended way run `jelly-cli` is to use a pre-built binary. Go to the **[releases page](https://github.com/Jelly-RDF/cli/releases/latest)** and download the binary built for your platform. +If you are using Linux (x86_64, ARM64), macOS (ARM64), or WSL on Windows, the recommended way is to use the `install.sh` script, which will automatically install the newest release. +To do so, run: + +```shell +$ curl -sSfL https://raw.githubusercontent.com/Jelly-RDF/cli/main/install.sh | bash +$ jelly-cli --help +``` + + +For Windows (x86_64), the recommended way run `jelly-cli` is to use a pre-built binary. Go to the **[releases page](https://github.com/Jelly-RDF/cli/releases/latest)** and download the binary built for your platform. You can then run it like so: @@ -20,7 +29,7 @@ $ ./jelly-cli --help To convert an RDF file (e.g., Turtle) to Jelly, simply run: ```shell -$ ./jelly-cli rdf to-jelly input.ttl > output.jelly +$ jelly-cli rdf to-jelly input.ttl > output.jelly ``` ### Convert Jelly to RDF @@ -28,14 +37,14 @@ $ ./jelly-cli rdf to-jelly input.ttl > output.jelly To convert from Jelly to RDF run: ```shell -$ ./jelly-cli rdf from-jelly input.jelly > output.nq +$ jelly-cli rdf from-jelly input.jelly > output.nq ``` By default, `jelly-cli` will translate files to NQuads. But you can also specify the output format with `--out-format`, for example: ```shell -$ ./jelly-cli rdf from-jelly input.jelly --out-format=ttl > output.ttl +$ jelly-cli rdf from-jelly input.jelly --out-format=ttl > output.ttl ``` You can specify most well-known formats supported by Apache Jena, but also a custom Jelly-Text format. @@ -46,7 +55,7 @@ Jelly-Text is a human-readable translation of Jelly binary. It's not meant for m The `rdf transcode` command turns one or more input Jelly streams into a single output stream. It's extremely fast, using a dedicated transcoding algorithm. However, the numerical values for each of the options in the output stream must be greater than or equal to those in the input stream(s). ```shell -$ ./jelly-cli rdf transcode input.jelly > output.jelly +$ jelly-cli rdf transcode input.jelly > output.jelly ``` ### Inspect Jelly files @@ -54,13 +63,13 @@ $ ./jelly-cli rdf transcode input.jelly > output.jelly To inspect a Jelly file and get basic information describing its contents, such as stream options or number of triples in the file, run ```shell -$ ./jelly-cli rdf inspect input.jelly +$ jelly-cli rdf inspect input.jelly ``` You can also compute the statistics separately for each stream frame with the `--per-frame` option: ```shell -$ ./jelly-cli rdf inspect input.jelly --per-frame +$ jelly-cli rdf inspect input.jelly --per-frame ``` In both cases, you will get the output as a valid YAML. @@ -70,7 +79,7 @@ In both cases, you will get the output as a valid YAML. To validate a Jelly file, run ```shell -$ ./jelly-cli rdf validate input.jelly +$ jelly-cli rdf validate input.jelly ``` You can also check whether the Jelly file has been encoded using specific stream options or is equivalent to another RDF file, with the use of additional options to this command. @@ -80,11 +89,11 @@ You can also check whether the Jelly file has been encoded using specific stream Use the `--help` option to learn more about all the available settings: ```shell -$ ./jelly-cli rdf to-jelly --help -$ ./jelly-cli rdf from-jelly --help -$ ./jelly-cli rdf transcode --help -$ ./jelly-cli rdf inspect --help -$ ./jelly-cli rdf validate --help +$ jelly-cli rdf to-jelly --help +$ jelly-cli rdf from-jelly --help +$ jelly-cli rdf transcode --help +$ jelly-cli rdf inspect --help +$ jelly-cli rdf validate --help ``` And use the `--debug` option to get more information about any exceptions you encounter. diff --git a/install.sh b/install.sh index e826cf9..26cb9ea 100755 --- a/install.sh +++ b/install.sh @@ -24,13 +24,13 @@ case $OS in esac # Append the architecture to the binary name but yell for cases we don't support case $ARCH in - x86_64) BINARY_NAME+="-x86_64" ;; + x86_64) BINARY_NAME+="-x86_64" + # check that os not darwin here + if [[ "$OS" = "darwin" ]]; then + echo "Unsupported architecture: $ARCH on macOS" + exit 1 + fi;; aarch64) - # check that os not darwin here - if [[ "$OS" = "darwin" ]]; then - echo "Unsupported architecture: $ARCH on macOS" - exit 1 - fi BINARY_NAME+="-arm64" ;; *) echo "Unsupported architecture: $ARCH" exit 1 From e4058f021daac0c3fa7de91e555230bedcf22140 Mon Sep 17 00:00:00 2001 From: Karolina Bogacka Date: Sun, 20 Jul 2025 22:00:01 +0200 Subject: [PATCH 04/13] Fix problems with PATH updating only for the child process --- README.md | 6 +++--- install.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 31025fd..23617b8 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ If you are using Linux (x86_64, ARM64), macOS (ARM64), or WSL on Windows, the re To do so, run: ```shell -$ curl -sSfL https://raw.githubusercontent.com/Jelly-RDF/cli/main/install.sh | bash -$ jelly-cli --help +$ curl -sSfL https://raw.githubusercontent.com/Jelly-RDF/cli/main/install.sh | . +$ jelly-cli ``` @@ -19,7 +19,7 @@ You can then run it like so: ```shell $ chmod +x jelly-cli -$ ./jelly-cli --help +$ ./jelly-cli ``` ## Usage diff --git a/install.sh b/install.sh index 26cb9ea..e79c061 100755 --- a/install.sh +++ b/install.sh @@ -76,9 +76,9 @@ fi # Check if zsh or bash is being used and source the appropriate file if [[ "$SHELL" == *"zsh"* ]]; then - echo 'Run source "$HOME/.zshrc" or restart your terminal to apply changes.' + echo "Run source ""$HOME/.zshrc"" or restart your terminal to apply changes." elif [[ "$SHELL" == *"bash"* ]]; then - echo 'Run source "$HOME/.bashrc" or restart your terminal to apply changes.' + echo "Run source ""$HOME/.bashrc"" or restart your terminal to apply changes." fi From 8fcae47c896b033b23b4cf1758ed524a1c861670 Mon Sep 17 00:00:00 2001 From: Karolina Bogacka Date: Tue, 22 Jul 2025 16:34:02 +0200 Subject: [PATCH 05/13] Correct srchitectures --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index e79c061..e79b721 100755 --- a/install.sh +++ b/install.sh @@ -32,6 +32,8 @@ case $ARCH in fi;; aarch64) BINARY_NAME+="-arm64" ;; + arm64) + BINARY_NAME+="-arm64" ;; *) echo "Unsupported architecture: $ARCH" exit 1 ;; From 48ed6a22772928ae52bc7072d73983c088539b0b Mon Sep 17 00:00:00 2001 From: Karolina Bogacka Date: Tue, 22 Jul 2025 17:05:10 +0200 Subject: [PATCH 06/13] Modify script --- install.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index e79b721..d0b0d02 100755 --- a/install.sh +++ b/install.sh @@ -8,7 +8,7 @@ RELEASE_INFO=$(curl -s $REPO) # And let's get the tag name of the latest release TAG_NAME=$(echo $RELEASE_INFO | grep -o '"tag_name": "[^"]*' | sed 's/"tag_name": "//') -if [[ -z "$TAG_NAME" ]]; then +if [ -z "$TAG_NAME" ]; then echo "Error: Could not fetch the latest release tag name." exit 1 fi @@ -24,16 +24,16 @@ case $OS in esac # Append the architecture to the binary name but yell for cases we don't support case $ARCH in - x86_64) BINARY_NAME+="-x86_64" + x86_64) ARCH_NAME="-x86_64" # check that os not darwin here - if [[ "$OS" = "darwin" ]]; then + if [ "$OS" = "darwin" ]; then echo "Unsupported architecture: $ARCH on macOS" exit 1 fi;; aarch64) - BINARY_NAME+="-arm64" ;; + ARCH_NAME="-arm64" ;; arm64) - BINARY_NAME+="-arm64" ;; + ARCH_NAME="-arm64" ;; *) echo "Unsupported architecture: $ARCH" exit 1 ;; @@ -41,7 +41,7 @@ esac # Check the installation directory INSTALL_DIR="$HOME/.local/bin" -if [[ ! -d "$INSTALL_DIR" ]]; then +if [ ! -d "$INSTALL_DIR" ]; then echo "Creating installation directory: $INSTALL_DIR" mkdir -p "$INSTALL_DIR" fi @@ -50,9 +50,9 @@ fi if ! echo "$PATH" | grep -q "$INSTALL_DIR"; then echo "Adding $INSTALL_DIR to PATH" # Check shell config file from bash and zsh - if [[ "$SHELL" == *"zsh"* ]]; then + if expr "$SHELL" : '.*zsh' >/dev/null; then echo "export PATH=\"\$PATH:$INSTALL_DIR\"" >> "$HOME/.zshrc" - elif [[ "$SHELL" == *"bash"* ]]; then + elif expr "$SHELL" : '.*bash' >/dev/null; then echo "export PATH=\"\$PATH:$INSTALL_DIR\"" >> "$HOME/.bashrc" fi fi @@ -62,7 +62,7 @@ export PATH="$PATH:$INSTALL_DIR" # Download the binary -DOWNLOAD_URL="https://github.com/$REPO_BASE/releases/download/$TAG_NAME/$BINARY_NAME" +DOWNLOAD_URL="https://github.com/$REPO_BASE/releases/download/$TAG_NAME/$BINARY_NAME$ARCH_NAME" echo "Downloading $BINARY_NAME from $DOWNLOAD_URL" curl -L "$DOWNLOAD_URL" -o "$INSTALL_DIR/jelly-cli" chmod +x "$INSTALL_DIR/jelly-cli" @@ -77,9 +77,9 @@ else fi # Check if zsh or bash is being used and source the appropriate file -if [[ "$SHELL" == *"zsh"* ]]; then +if expr "$SHELL" : '.*zsh' >/dev/null; then echo "Run source ""$HOME/.zshrc"" or restart your terminal to apply changes." -elif [[ "$SHELL" == *"bash"* ]]; then +elif expr "$SHELL" : '.*bash' >/dev/null; then echo "Run source ""$HOME/.bashrc"" or restart your terminal to apply changes." fi From 73541d26fb039ac1d6f32d92beff99ce5758cb08 Mon Sep 17 00:00:00 2001 From: Karolina Bogacka Date: Tue, 22 Jul 2025 17:12:02 +0200 Subject: [PATCH 07/13] Correct a mistake --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index d0b0d02..e64168c 100755 --- a/install.sh +++ b/install.sh @@ -69,7 +69,7 @@ chmod +x "$INSTALL_DIR/jelly-cli" # Link the binary to the installation directory -if [[ -f "$INSTALL_DIR/jelly-cli" ]]; then +if [ -f "$INSTALL_DIR/jelly-cli" ]; then echo "Installation successful! You can now use Jelly CLI by running 'jelly-cli'." else echo "Error: Installation failed. The binary was not found in the installation directory." From e9ee1dba3e0b039b7184fdb69c0600a6453fc656 Mon Sep 17 00:00:00 2001 From: Karolina Bogacka Date: Tue, 22 Jul 2025 17:22:09 +0200 Subject: [PATCH 08/13] Correct docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 23617b8..37a6c0d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ If you are using Linux (x86_64, ARM64), macOS (ARM64), or WSL on Windows, the re To do so, run: ```shell -$ curl -sSfL https://raw.githubusercontent.com/Jelly-RDF/cli/main/install.sh | . +$ . <(curl -sSfL https://raw.githubusercontent.com/Jelly-RDF/cli/main/install.sh) $ jelly-cli ``` From db1045fbb6770acb49d2a01b1977b7c3ee5ed308 Mon Sep 17 00:00:00 2001 From: Karolina Bogacka Date: Tue, 22 Jul 2025 17:30:25 +0200 Subject: [PATCH 09/13] Change the README a bit --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index e64168c..78deee6 100755 --- a/install.sh +++ b/install.sh @@ -78,9 +78,9 @@ fi # Check if zsh or bash is being used and source the appropriate file if expr "$SHELL" : '.*zsh' >/dev/null; then - echo "Run source ""$HOME/.zshrc"" or restart your terminal to apply changes." + echo "Run source ""$HOME/.zshrc"" or restart your terminal to permanently link the jelly-cli command." elif expr "$SHELL" : '.*bash' >/dev/null; then - echo "Run source ""$HOME/.bashrc"" or restart your terminal to apply changes." + echo "Run source ""$HOME/.bashrc"" or restart your terminal to permanently link the jelly-cli command." fi From b71feebfd306e844d3812fafb7fefd18c14734af Mon Sep 17 00:00:00 2001 From: Karolina Bogacka Date: Tue, 22 Jul 2025 18:05:20 +0200 Subject: [PATCH 10/13] Change the mac name --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 78deee6..0e61d5d 100755 --- a/install.sh +++ b/install.sh @@ -19,7 +19,7 @@ ARCH=$(uname -m) # Map the architecture to the appropriate binary name case $OS in linux) BINARY_NAME="jelly-cli-linux" ;; - darwin) BINARY_NAME="jelly-cli-macos" ;; + darwin) BINARY_NAME="jelly-cli-mac" ;; *) echo "Unsupported operating system: $OS"; exit 1 ;; esac # Append the architecture to the binary name but yell for cases we don't support From 6bf0b40087a4b928300e4659fe1a4d4ea125b5e4 Mon Sep 17 00:00:00 2001 From: Karolina Bogacka Date: Tue, 22 Jul 2025 18:28:08 +0200 Subject: [PATCH 11/13] Add more checks --- install.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 0e61d5d..c9ba9a8 100755 --- a/install.sh +++ b/install.sh @@ -10,6 +10,7 @@ RELEASE_INFO=$(curl -s $REPO) TAG_NAME=$(echo $RELEASE_INFO | grep -o '"tag_name": "[^"]*' | sed 's/"tag_name": "//') if [ -z "$TAG_NAME" ]; then echo "Error: Could not fetch the latest release tag name." + return 1 exit 1 fi @@ -28,6 +29,7 @@ case $ARCH in # check that os not darwin here if [ "$OS" = "darwin" ]; then echo "Unsupported architecture: $ARCH on macOS" + return 1 exit 1 fi;; aarch64) @@ -35,6 +37,7 @@ case $ARCH in arm64) ARCH_NAME="-arm64" ;; *) echo "Unsupported architecture: $ARCH" + return 1 exit 1 ;; esac @@ -46,6 +49,19 @@ if [ ! -d "$INSTALL_DIR" ]; then mkdir -p "$INSTALL_DIR" fi + +# Download the binary +DOWNLOAD_URL="https://github.com/$REPO_BASE/releases/download22/$TAG_NAME/$BINARY_NAME$ARCH_NAME" +echo "Downloading $BINARY_NAME from $DOWNLOAD_URL" +curl -L "$DOWNLOAD_URL" -o "$INSTALL_DIR/jelly-cli" +CONTENT=$(wc -c "$INSTALL_DIR/jelly-cli" | awk '{print $1}') +if [ $CONTENT -lt 500 ]; then + echo "Error: Failed to download the binary from $DOWNLOAD_URL" + return 1 + exit 1 +fi +chmod +x "$INSTALL_DIR/jelly-cli" + # Ensure that the installation directory is in the PATH if ! echo "$PATH" | grep -q "$INSTALL_DIR"; then echo "Adding $INSTALL_DIR to PATH" @@ -60,14 +76,6 @@ fi # Add the binary to the PATH for the current session export PATH="$PATH:$INSTALL_DIR" - -# Download the binary -DOWNLOAD_URL="https://github.com/$REPO_BASE/releases/download/$TAG_NAME/$BINARY_NAME$ARCH_NAME" -echo "Downloading $BINARY_NAME from $DOWNLOAD_URL" -curl -L "$DOWNLOAD_URL" -o "$INSTALL_DIR/jelly-cli" -chmod +x "$INSTALL_DIR/jelly-cli" - - # Link the binary to the installation directory if [ -f "$INSTALL_DIR/jelly-cli" ]; then echo "Installation successful! You can now use Jelly CLI by running 'jelly-cli'." From 1e062cacd9942f20ea1121dd1f9b0a894d4180e0 Mon Sep 17 00:00:00 2001 From: Karolina Bogacka Date: Tue, 22 Jul 2025 18:29:07 +0200 Subject: [PATCH 12/13] correct missspelling --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index c9ba9a8..9f6ce86 100755 --- a/install.sh +++ b/install.sh @@ -51,7 +51,7 @@ fi # Download the binary -DOWNLOAD_URL="https://github.com/$REPO_BASE/releases/download22/$TAG_NAME/$BINARY_NAME$ARCH_NAME" +DOWNLOAD_URL="https://github.com/$REPO_BASE/releases/download/$TAG_NAME/$BINARY_NAME$ARCH_NAME" echo "Downloading $BINARY_NAME from $DOWNLOAD_URL" curl -L "$DOWNLOAD_URL" -o "$INSTALL_DIR/jelly-cli" CONTENT=$(wc -c "$INSTALL_DIR/jelly-cli" | awk '{print $1}') From 7ec30659d867b2b3d88492c64a1347154baae26b Mon Sep 17 00:00:00 2001 From: Karolina Bogacka Date: Fri, 25 Jul 2025 10:57:45 +0200 Subject: [PATCH 13/13] Correct some PATH aspects --- install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 9f6ce86..2befc18 100755 --- a/install.sh +++ b/install.sh @@ -65,6 +65,8 @@ chmod +x "$INSTALL_DIR/jelly-cli" # Ensure that the installation directory is in the PATH if ! echo "$PATH" | grep -q "$INSTALL_DIR"; then echo "Adding $INSTALL_DIR to PATH" + # Add the binary to the PATH for the current session + export PATH="$PATH:$INSTALL_DIR" # Check shell config file from bash and zsh if expr "$SHELL" : '.*zsh' >/dev/null; then echo "export PATH=\"\$PATH:$INSTALL_DIR\"" >> "$HOME/.zshrc" @@ -73,9 +75,6 @@ if ! echo "$PATH" | grep -q "$INSTALL_DIR"; then fi fi -# Add the binary to the PATH for the current session -export PATH="$PATH:$INSTALL_DIR" - # Link the binary to the installation directory if [ -f "$INSTALL_DIR/jelly-cli" ]; then echo "Installation successful! You can now use Jelly CLI by running 'jelly-cli'."