From e1cda88f01c47e5a80537e5b0ab03886cd03654e Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 00:22:49 +0000 Subject: [PATCH 1/3] Update install.sh to handle /home/ubuntu/.bin directory and prompt for shell reload Co-Authored-By: jhaynie@agentuity.com --- install.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/install.sh b/install.sh index 02074093..d898c1dd 100755 --- a/install.sh +++ b/install.sh @@ -35,6 +35,7 @@ abort() { success() { ohai "Installation complete! Run 'agentuity --help' to get started." ohai "For more information, visit: $(url "https://agentuity.dev")" + ohai "To apply PATH changes, restart your terminal or run: source ~/.$(basename $SHELL)rc" exit 0 } @@ -58,6 +59,8 @@ if [[ "$OS" == "Darwin" ]]; then EXTENSION="tar.gz" if [[ -d "$HOME/.local/bin" ]] && [[ -w "$HOME/.local/bin" ]]; then INSTALL_DIR="$HOME/.local/bin" + elif [[ -d "$HOME/.bin" ]] && [[ -w "$HOME/.bin" ]]; then + INSTALL_DIR="$HOME/.bin" elif [[ -d "$HOME/bin" ]] && [[ -w "$HOME/bin" ]]; then INSTALL_DIR="$HOME/bin" else @@ -68,6 +71,8 @@ elif [[ "$OS" == "Linux" ]]; then EXTENSION="tar.gz" if [[ -d "$HOME/.local/bin" ]] && [[ -w "$HOME/.local/bin" ]]; then INSTALL_DIR="$HOME/.local/bin" + elif [[ -d "$HOME/.bin" ]] && [[ -w "$HOME/.bin" ]]; then + INSTALL_DIR="$HOME/.bin" elif [[ -d "$HOME/bin" ]] && [[ -w "$HOME/bin" ]]; then INSTALL_DIR="$HOME/bin" else @@ -157,6 +162,11 @@ if [[ ! -d "$INSTALL_PATH" ]] || [[ ! -w "$INSTALL_PATH" ]]; then ohai "Using $HOME/.local/bin instead" INSTALL_PATH="$HOME/.local/bin" fi + elif [[ -d "$HOME/.bin" ]] || mkdir -p "$HOME/.bin" 2>/dev/null; then + if [[ -w "$HOME/.bin" ]]; then + ohai "Using $HOME/.bin instead" + INSTALL_PATH="$HOME/.bin" + fi elif [[ -d "$HOME/bin" ]] || mkdir -p "$HOME/bin" 2>/dev/null; then if [[ -w "$HOME/bin" ]]; then ohai "Using $HOME/bin instead" @@ -320,21 +330,26 @@ if [[ ":$PATH:" != *":$INSTALL_PATH:"* ]]; then if [[ -n "$SHELL_CONFIG" ]] && [[ -w "$SHELL_CONFIG" ]]; then echo "export PATH=\"\$PATH:$INSTALL_PATH\"" >> "$SHELL_CONFIG" ohai "Added $INSTALL_PATH to PATH in $SHELL_CONFIG" + ohai "To apply changes, restart your terminal or run: source $SHELL_CONFIG" export PATH="$PATH:$INSTALL_PATH" else warn "$INSTALL_PATH is not in your PATH. You may need to add it manually to use the agentuity command." case "$SHELL" in */bash*) echo " echo 'export PATH=\"\$PATH:$INSTALL_PATH\"' >> ~/.bashrc" + echo " source ~/.bashrc # To apply changes immediately" ;; */zsh*) echo " echo 'export PATH=\"\$PATH:$INSTALL_PATH\"' >> ~/.zshrc" + echo " source ~/.zshrc # To apply changes immediately" ;; */fish*) echo " echo 'set -gx PATH \$PATH $INSTALL_PATH' >> ~/.config/fish/config.fish" + echo " source ~/.config/fish/config.fish # To apply changes immediately" ;; *) echo " Add $INSTALL_PATH to your PATH" + echo " Then restart your terminal or reload your shell configuration" ;; esac fi From 3e5963b35b480a9e4b699bfb6bd690c5372291d6 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 01:24:22 +0000 Subject: [PATCH 2/3] Update install.sh to only show reload message if agentuity is not in PATH Co-Authored-By: jhaynie@agentuity.com --- install.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index d898c1dd..8dbf3e27 100755 --- a/install.sh +++ b/install.sh @@ -35,7 +35,11 @@ abort() { success() { ohai "Installation complete! Run 'agentuity --help' to get started." ohai "For more information, visit: $(url "https://agentuity.dev")" - ohai "To apply PATH changes, restart your terminal or run: source ~/.$(basename $SHELL)rc" + + if ! command -v agentuity >/dev/null 2>&1; then + ohai "To apply PATH changes, restart your terminal or run: source ~/.$(basename $SHELL)rc" + fi + exit 0 } @@ -330,7 +334,11 @@ if [[ ":$PATH:" != *":$INSTALL_PATH:"* ]]; then if [[ -n "$SHELL_CONFIG" ]] && [[ -w "$SHELL_CONFIG" ]]; then echo "export PATH=\"\$PATH:$INSTALL_PATH\"" >> "$SHELL_CONFIG" ohai "Added $INSTALL_PATH to PATH in $SHELL_CONFIG" - ohai "To apply changes, restart your terminal or run: source $SHELL_CONFIG" + + if ! command -v agentuity >/dev/null 2>&1; then + ohai "To apply changes, restart your terminal or run: source $SHELL_CONFIG" + fi + export PATH="$PATH:$INSTALL_PATH" else warn "$INSTALL_PATH is not in your PATH. You may need to add it manually to use the agentuity command." From d9703920b804a6feac8c4efd16bbe3fd84863beb Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 01:39:50 +0000 Subject: [PATCH 3/3] Update reload message color to magenta for better visibility Co-Authored-By: jhaynie@agentuity.com --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 8dbf3e27..9ff853d0 100755 --- a/install.sh +++ b/install.sh @@ -13,6 +13,7 @@ tty_red="$(tty_mkbold 31)" tty_bold="$(tty_mkbold 39)" tty_reset="$(tty_escape 0)" tty_cyan="$(tty_mkbold 36)" +tty_magenta="$(tty_mkbold 35)" tty_underline="$(tty_escape 4)" ohai() { @@ -37,7 +38,7 @@ success() { ohai "For more information, visit: $(url "https://agentuity.dev")" if ! command -v agentuity >/dev/null 2>&1; then - ohai "To apply PATH changes, restart your terminal or run: source ~/.$(basename $SHELL)rc" + printf "${tty_blue}==>${tty_bold} ${tty_magenta}To apply PATH changes, restart your terminal or run:${tty_reset} source ~/.$(basename $SHELL)rc\n" fi exit 0 @@ -336,7 +337,7 @@ if [[ ":$PATH:" != *":$INSTALL_PATH:"* ]]; then ohai "Added $INSTALL_PATH to PATH in $SHELL_CONFIG" if ! command -v agentuity >/dev/null 2>&1; then - ohai "To apply changes, restart your terminal or run: source $SHELL_CONFIG" + printf "${tty_blue}==>${tty_bold} ${tty_magenta}To apply changes, restart your terminal or run:${tty_reset} source $SHELL_CONFIG\n" fi export PATH="$PATH:$INSTALL_PATH"