chore: update installer to run internalai install automatically and reload shell if PATH is modified

This commit is contained in:
Jose B
2025-12-19 10:46:09 -05:00
parent 9056df987d
commit 216f0d9fa6
2 changed files with 14 additions and 1 deletions

View File

@@ -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

View File

@@ -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 "$@"