-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·55 lines (47 loc) · 1.35 KB
/
Copy pathsetup
File metadata and controls
executable file
·55 lines (47 loc) · 1.35 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
#!/usr/bin/env zsh
DOTFILES=$HOME/.dotfiles
mkdir -p $DOTFILES
cp -r ./* $DOTFILES/*
setup_link() {
SOURCE=$DOTFILES/$1
DEST=$HOME/$2
if [ -L "$DEST" ]; then
rm -f $DEST
fi
echo "$SOURCE -> $DEST"
ln -s $SOURCE $DEST
}
setup_link "zsh/zshrc" ".zshrc"
mkdir -p $HOME/.zsh
mkdir -p $HOME/.zsh/var/
mkdir -p $HOME/.zsh/plugins/
setup_link "zsh/p10k.zsh" ".zsh/p10k.zsh"
#for ZSH_PLUGIN in $DOTFILES/zsh/plugins/*; do
# NAME=$(basename $ZSH_PLUGIN)
# setup_link "zsh/plugins/$NAME" ".zsh/plugins/$NAME"
#done
## tbd
mkdir -p $HOME/.vim
for VIMFILE in $DOTFILES/vim/*; do
NAME=$(basename $VIMFILE)
setup_link "vim/$NAME" ".vim/$NAME"
done
#[ ! -d $HOME/.git ] && mkdir $HOME/.git
#setup_link "git/config" ".gitconfig"
#setup_link "git/ignore" ".git/ignore"
#
#mkdir -p $HOME/bin
#for bin_script in $DOTFILES/bin/*; do
# name=$(basename $bin_script)
# setup_link "bin/$name" "bin/$name"
#done
#for tool in $DOTFILES/tools/*; do
# tool_name=$(basename $tool)
# for bin_script in $tool/bin/*; do
# name=$(basename $bin_script)
# setup_link "tools/$tool_name/bin/$name" "bin/$name"
# done
#done
echo ""
echo "Config files are setup."
echo "Run 'reload-config' to re-source zsh config."