From 216f0d9fa647e18c4022b5e7b2c1dd7e6786c9e0 Mon Sep 17 00:00:00 2001 From: Jose B Date: Fri, 19 Dec 2025 10:46:09 -0500 Subject: [PATCH] chore: update installer to run `internalai install` automatically and reload shell if PATH is modified --- README.md | 2 +- install.sh | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 122387f..f6223a3 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ The InternalAI platform repository is private. You'll need one of: ### 1. Run the Installer ```bash -curl -fsSL https://gitea.app.monadical.io/monadical/internalai-setup/raw/branch/main/install.sh | bash +curl -fsSL https://gitea.app.monadical.io/monadical/internalai-setup/raw/branch/main/install.sh | bash; internalai install ``` ### 2. Follow the Prompts diff --git a/install.sh b/install.sh index ea05a55..032b453 100755 --- a/install.sh +++ b/install.sh @@ -15,6 +15,10 @@ CLI_INSTALL_DIR="/usr/local/bin" CLI_NAME="internalai" VERSION="1.0.0" +# Track if PATH was modified +PATH_MODIFIED=false +LOCAL_BIN_DIR="$HOME/.local/bin" + # Colors RED='\033[0;31m' GREEN='\033[0;32m' @@ -327,6 +331,7 @@ install_just() { if [[ ":$PATH:" != *":$install_dir:"* ]]; then log_info "Adding $install_dir to PATH..." export PATH="$install_dir:$PATH" + PATH_MODIFIED=true fi # Persist PATH to shell profiles @@ -350,6 +355,7 @@ install_uv() { # Add uv to PATH for current session if [[ ":$PATH:" != *":$install_dir:"* ]]; then export PATH="$install_dir:$PATH" + PATH_MODIFIED=true fi # Persist PATH to shell profiles @@ -895,6 +901,13 @@ main() { echo -e "${GREEN}${BOLD}Setup completed successfully!${NC}" echo "" + + # If PATH was modified, restart the shell to pick up changes + if [ "$PATH_MODIFIED" = true ]; then + log_info "Reloading shell to apply PATH changes..." + echo "" + exec "$SHELL" -l + fi } main "$@"