Skip to content

Don't install to /usr/local/bin #155

Closed

Description

@ediril

That seems too aggressive.. it should install to my local home directory somewhere where it doesn't need sudo.

Activity

  1. ediril commented on Feb 16, 2026

    @ediril
    Author

    Here is what i'm suggesting:

    --- ~/install.sh	2026-02-16 17:36:09
    +++ ~/install-rtk.sh	2026-02-16 17:35:58
    @@ -6,7 +6,7 @@
     
     REPO="rtk-ai/rtk"
     BINARY_NAME="rtk"
    -INSTALL_DIR="/usr/local/bin"
    +INSTALL_DIR="$HOME/.local/bin"
     
     # Colors
     RED='\033[0;31m'
    @@ -71,6 +71,9 @@
         info "Target: $TARGET"
         info "Version: $VERSION"
     
    +    # Ensure install directory exists
    +    mkdir -p "$INSTALL_DIR"
    +
         DOWNLOAD_URL="https://github.com/${REPO}/releases/download/${VERSION}/${BINARY_NAME}-${TARGET}.tar.gz"
         TEMP_DIR=$(mktemp -d)
         ARCHIVE="${TEMP_DIR}/${BINARY_NAME}.tar.gz"
    @@ -83,13 +86,7 @@
         info "Extracting..."
         tar -xzf "$ARCHIVE" -C "$TEMP_DIR"
     
    -    # Check if we need sudo
    -    if [ -w "$INSTALL_DIR" ]; then
    -        mv "${TEMP_DIR}/${BINARY_NAME}" "${INSTALL_DIR}/"
    -    else
    -        info "Requesting sudo to install to $INSTALL_DIR"
    -        sudo mv "${TEMP_DIR}/${BINARY_NAME}" "${INSTALL_DIR}/"
    -    fi
    +    mv "${TEMP_DIR}/${BINARY_NAME}" "${INSTALL_DIR}/"
     
         chmod +x "${INSTALL_DIR}/${BINARY_NAME}"
    
    
    
  2. added a commit that references this issue on Feb 17, 2026
    1c9b4fe
  3. added a commit that references this issue on Feb 17, 2026
    bd240dc
  4. added a commit that references this issue on Feb 17, 2026
    0b34772
  5. added a commit that references this issue on May 14, 2026
    3d1b84d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions