-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·40 lines (31 loc) · 1.01 KB
/
Copy pathbootstrap.sh
File metadata and controls
executable file
·40 lines (31 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
DOTFILES_REPO="acedanger/dotfiles"
DOTFILES_BRANCH="main"
DOTFILES_DIR="$HOME/dev/dotfiles"
# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
echo -e "${GREEN}Setting up your system...${NC}"
# Install git if not present
if ! command -v git &>/dev/null; then
echo -e "${YELLOW}Installing git...${NC}"
sudo apt update && sudo apt install -y git
fi
# Create dev directory if it doesn't exist
mkdir -p "$HOME/dev"
# Clone or update repository
if [ -d "$DOTFILES_DIR" ]; then
echo -e "${YELLOW}Updating existing dotfiles repository...${NC}"
cd "$DOTFILES_DIR"
git pull origin $DOTFILES_BRANCH
else
echo -e "${YELLOW}Cloning dotfiles repository...${NC}"
git clone "https://github.com/$DOTFILES_REPO.git" "$DOTFILES_DIR"
cd "$DOTFILES_DIR"
fi
# Make scripts executable
chmod +x "$DOTFILES_DIR/setup/setup.sh"
# Run setup script
"$DOTFILES_DIR/setup/setup.sh"
echo -e "${GREEN}Bootstrap completed! Please restart your terminal for changes to take effect.${NC}"