-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·40 lines (31 loc) · 1.12 KB
/
install.sh
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/sh
USER_PATH="/Users/$(whoami)"
mkdir -p ~/.config
mkdir -p ~/.config/nvim/lua
mkdir -p ~/.config/nvim/lua/config
mkdir -p ~/.config/nvim/lua/plugins
mkdir -p ~/.config/fish/themes
rm -f ~/.config/fish/functions/fish_prompt.fish
rm -f ~/.config/fish/config.fish
rm -f ~/.config/fish/fish_plugins
ln -sf $PWD/fish/config.fish ~/.config/fish/config.fish
ln -sf $PWD/fish/fish_plugins ~/.config/fish/fish_plugins
ln -sf $PWD/fish/tokyonight_storm.theme ~/.config/fish/themes/tokyonight_storm.theme
rm -f ~/.config/nvim/init.lua
ln -sf $PWD/nvim/init.lua ~/.config/nvim/init.lua
for file in "$PWD/nvim/lua/config"/*; do
# Extract the filename from the path
filename=$(basename "$file")
target_file="$USER_PATH/.config/nvim/lua/config/$filename"
rm -f "$target_file"
# Create a symbolic link in the target directory
ln -sf "$file" "$target_file"
done
for file in "$PWD/nvim/lua/plugins"/*; do
# Extract the filename from the path
filename=$(basename "$file")
target_file="$USER_PATH/.config/nvim/lua/plugins/$filename"
rm -f "$target_file"
# Create a symbolic link in the target directory
ln -sf "$file" "$target_file"
done