-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·40 lines (32 loc) · 1.45 KB
/
setup.sh
File metadata and controls
executable file
·40 lines (32 loc) · 1.45 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
# Predefined list of file names
files=("zshrc" "shell_aliases" "config/ranger")
# Loop through each file name
for file in "${files[@]}"; do
# Check if source file exists
if [ ! -f "$file" ]; then
echo "Warning: Source file '$file' does not exist, skipping..."
continue
fi
# Check if destination already exists
if [ -e "$HOME/.$file" ]; then
rm "$HOME/.$file"
fi
# Create symbolic link
ln -s "$(pwd)/$file" "$HOME/.$file"
# Verify the link was created successfully
if [ $? -eq 0 ]; then
echo "✓ Created symlink: ~/.$file -> $(pwd)/$file"
else
echo "✗ Failed to create symlink for $file"
fi
done
echo "Symbolic link creation completed!"
# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
## Git clone oh-my-zsh modules
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-completions.git ~/.oh-my-zsh/custom/plugins/zsh-completions
git clone https://github.com/zsh-users/zsh-history-substring-search.git ~/.oh-my-zsh/custom/plugins/zsh-history-substring-search