-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlink.sh
executable file
·33 lines (29 loc) · 1.25 KB
/
link.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
#!/usr/bin/env bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
mkdir -p "$HOME/.config"
NVIM_PLUGINS_DIRECTORY="$HOME/.local/share/nvim/site/pack/packer/start"
mkdir -p "$NVIM_PLUGINS_DIRECTORY"
function symlinkDirectory() {
local directory
directory="$1"
for file in $directory/.*; do
if [[ "$file" =~ \.config$ ]] || [[ "$(basename $file)" =~ \.\.?$ ]]; then
echo "ignoring $file ..."
else
# echo "$file ~/$(basename $file)"
ln -sfv $file ~/$(basename $file)
fi
done
}
symlinkDirectory "$SCRIPT_DIR/link"
ln -sFv "$SCRIPT_DIR/link/.config/lazygit" ~/.config
ln -sFv "$SCRIPT_DIR/link/.config/direnv" ~/.config
ln -sFv "$SCRIPT_DIR/nvim" ~/.config
ln -sFv "$SCRIPT_DIR/submodules/packer.nvim" "$NVIM_PLUGINS_DIRECTORY"
ln -sFv "$SCRIPT_DIR/prompt_rkoval_setup" ~/.zgen/sorin-ionescu/prezto-master/modules/prompt/functions
mkdir -p ~/.cursor/extensions
mkdir -p ~/.vscode/extensions
ln -sFv "$SCRIPT_DIR/vscode/extension/rkoval.rkoval-0.0.1" ~/.cursor/extensions
ln -sFv "$SCRIPT_DIR/vscode/extension/rkoval.rkoval-0.0.1" ~/.vscode/extensions
ln -sFv "$SCRIPT_DIR/vscode/snippets" "$HOME/Library/Application Support/Cursor/User"
# ln -sFv "$SCRIPT_DIR/vscode/snippets" "$HOME/Library/Application Support/VSCode/User"