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:
@@ -1,7 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Bootstrap script for VPS - Ensures latest homelab agents are available
|
# 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:
|
# This script:
|
||||||
# - Clones or updates the homelab-agents repo
|
# - Clones or updates the homelab-agents repo
|
||||||
@@ -75,7 +77,7 @@ else
|
|||||||
echo "✅ Created ~/.bashrc with scripts directory"
|
echo "✅ Created ~/.bashrc with scripts directory"
|
||||||
fi
|
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"
|
export PATH="$SCRIPTS_DIR:$PATH"
|
||||||
echo "✅ Scripts directory added to current session PATH"
|
echo "✅ Scripts directory added to current session PATH"
|
||||||
|
|
||||||
@@ -89,10 +91,8 @@ fi
|
|||||||
echo ""
|
echo ""
|
||||||
echo "✨ Homelab agents bootstrap complete!"
|
echo "✨ Homelab agents bootstrap complete!"
|
||||||
echo ""
|
echo ""
|
||||||
echo "📚 Available commands:"
|
echo "📚 Available commands (ready to use now):"
|
||||||
echo " init-project <name> - Initialize a new project with git remote"
|
echo " init-project <name> - Initialize a new project with git remote"
|
||||||
echo " cd ~/.homelab-agents - Browse agents and scripts"
|
echo " cd ~/.homelab-agents - Browse agents and scripts"
|
||||||
echo ""
|
echo ""
|
||||||
echo "📋 Agent location: $AGENTS_DIR/agents/sysadmin-session-closer.md"
|
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"
|
|
||||||
Reference in New Issue
Block a user