Update: Bootstrap script emphasize 'source' usage

- Updated usage comment to show 'source' syntax
- Add IMPORTANT note about why to use source not bash
- Remove misleading 'Tip' about restarting shell
- Clarify commands are ready immediately
- Update output messaging
This commit is contained in:
root
2025-11-23 22:07:52 +00:00
parent 7e62a571aa
commit 030e280c24

View File

@@ -1,7 +1,9 @@
#!/bin/bash
# Bootstrap script for VPS - Ensures latest homelab agents are available
#
# Usage: bash <(curl -s http://100.120.125.113:3000/pdm/homelab-agents/raw/branch/main/scripts/bootstrap-agents.sh)
# Usage: source <(curl -s http://100.120.125.113:3000/pdm/homelab-agents/raw/branch/main/scripts/bootstrap-agents.sh)
#
# IMPORTANT: Use 'source' not 'bash' so PATH updates take effect immediately!
#
# This script:
# - Clones or updates the homelab-agents repo
@@ -75,7 +77,7 @@ else
echo "✅ Created ~/.bashrc with scripts directory"
fi
# Also add to current session PATH
# Also add to current session PATH (this is why we use 'source' not 'bash')
export PATH="$SCRIPTS_DIR:$PATH"
echo "✅ Scripts directory added to current session PATH"
@@ -89,10 +91,8 @@ fi
echo ""
echo "✨ Homelab agents bootstrap complete!"
echo ""
echo "📚 Available commands:"
echo "📚 Available commands (ready to use now):"
echo " init-project <name> - Initialize a new project with git remote"
echo " cd ~/.homelab-agents - Browse agents and scripts"
echo ""
echo "📋 Agent location: $AGENTS_DIR/agents/sysadmin-session-closer.md"
echo ""
echo "💡 Tip: Run 'source ~/.bashrc' or restart your shell to ensure PATH is updated"
echo "📋 Agent location: $AGENTS_DIR/agents/sysadmin-session-closer.md"