File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Waiter script: waits for dotfiles install to complete and then launches zsh
4+ # This is useful when connecting to codespaces during setup
5+
6+ MAX_WAIT=300 # Maximum wait time in seconds (5 minutes)
7+ INTERVAL=2 # Check interval in seconds
8+ elapsed=0
9+
10+ echo " Waiting for dotfiles install to complete..."
11+
12+ # Check for starship as an indicator that dotfiles setup is complete
13+ # The install script runs starship installation as one of its steps
14+ while ! command -v starship & > /dev/null; do
15+ if [ $elapsed -ge $MAX_WAIT ]; then
16+ echo " "
17+ echo " Timeout: dotfiles install did not complete within $MAX_WAIT seconds."
18+ exit 1
19+ fi
20+ echo -n " ."
21+ sleep $INTERVAL
22+ elapsed=$(( elapsed + INTERVAL))
23+ done
24+
25+ echo " "
26+ echo " Dotfiles setup complete! Launching zsh..."
27+
28+ if command -v zsh & > /dev/null; then
29+ exec zsh
30+ else
31+ echo " Warning: zsh not available, falling back to current shell."
32+ fi
You can’t perform that action at this time.
0 commit comments