home · contact · privacy
Fix mail client system directories issue.
[config] / symlink.sh
1 #!/bin/sh
2
3 set -x
4
5 dir_user_minimal=~/config/dotfiles_user_minimal
6 dir_user_thinkpad=~/config/dotfiles_user_thinkpad
7 dir_user_server=~/config/dotfiles_user_server
8 dir_root=~/config/dotfiles_root
9 homedir=`echo ~`
10 find ~ -lname $homedir'/config/*' -delete
11 for file in `ls $dir_user_minimal`; do
12     ln -fs $dir_user_minimal/$file ~/.$file
13 done
14 if [ "$1" = "thinkpad" ]; then
15     for file in `ls $dir_user_thinkpad`; do
16         ln -fs $dir_user_thinkpad/$file ~/.$file
17     done
18 elif [ "$1" = "server" ]; then
19     for file in `ls $dir_user_server`; do
20         ln -fs $dir_user_server/$file ~/.$file
21     done
22 fi
23 if [ "$(id -u)" -eq "0" ]; then
24     for file in `ls $dir_root`; do
25         ln -fs $dir_root/$file ~/.$file
26     done
27 fi