-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmac.sh
More file actions
executable file
·57 lines (46 loc) · 1.19 KB
/
Copy pathmac.sh
File metadata and controls
executable file
·57 lines (46 loc) · 1.19 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
DOTFILES_DIR=~/dev/dotfiles
# Install Homebrew if it's missing
if ! command -v brew >/dev/null 2>&1; then
echo "Homebrew not found. Installing..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Install Brewfile packages
echo "Installing Brewfile packages..."
brew bundle --file="$DOTFILES_DIR/Brewfile"
# Install stow if missing
if ! command -v stow >/dev/null 2>&1; then
echo "Installing stow..."
brew install stow
fi
# Stow dotfiles
echo "Stowing dotfiles..."
cd "$DOTFILES_DIR" || exit
stow zsh bash vim git ghostty ticker lazyvim
DEV_DIR="$HOME/Dev"
if [ ! -d "$DEV_DIR" ]; then
echo "Creating $DEV_DIR..."
mkdir -p "$DEV_DIR"
else
echo "$DEV_DIR already exists, skipping creation."
fi
cd "$DEV_DIR" || exit
USERNAME="Junwo-o"
REPOS=(
"algorithmictrading"
"dotfiles"
"notes"
"journal"
"junwo-o.github.io"
)
for REPO in "${REPOS[@]}"; do
if [ ! -d "$REPO" ]; then
echo "Cloning $REPO..."
git clone "https://github.com/$USERNAME/$REPO.git"
else
echo "$REPO already exists. Pulling latest updates..."
(cd "$REPO" && git pull)
fi
done
echo "Installation complete! Reloading shell..."
exec zsh -l