-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·36 lines (31 loc) · 850 Bytes
/
Copy pathsetup.sh
File metadata and controls
executable file
·36 lines (31 loc) · 850 Bytes
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
#! /usr/bin/env bash
set -u
platform=$(uname)
if [[ $platform = Darwin ]]; then
ln_opts=-shv
elif [[ $platform = Linux ]]; then
ln_opts=-snv
fi
function link {
target_path=$1
link_path=$HOME/.$target_path
if [[ -L $link_path ]]; then
echo "Link exists: $link_path -> $target_path"
elif [[ -d $link_path ]]; then
echo "Directory exists at link path: $link_path"
elif [[ -e $link_path ]]; then
echo "File exists at link path: $link_path"
else
mkdir -p $(dirname $link_path)
ln $ln_opts $(realpath $target_path) $link_path
fi
}
cd $(dirname $(realpath $0))/dotfiles
link claude/CLAUDE.md
link config/fish/config.fish
link config/fish/functions
link config/helix/config.toml
link config/helix/languages.toml
link config/helix/themes
link config/jj/config.toml
link gdbinit