1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00
dotfiles/scripts/linkdotfiles

26 lines
531 B
Plaintext
Raw Normal View History

2016-03-31 02:12:46 +00:00
#!/bin/sh
set -e
cd `dirname ${BASH_SOURCE[0]}`
2016-04-02 14:41:54 +00:00
source ../.profile
2016-03-31 02:12:46 +00:00
cd $HOME
echo cd `pwd`
files=`ls -A $DOTFILES | awk '/^\..*/ && !/\.config$/ && !/\.git$/ && !/\.gitignore$/'`
2016-03-31 02:12:46 +00:00
homepath=`echo $DOTFILES | sed "s|$HOME/||g"`
conffiles=`ls -A "$DOTFILES/.config"`
confpath=`echo $homepath | sed "s|.config/||g"`
2016-03-31 17:35:15 +00:00
userhome=$HOME
2016-03-31 02:12:46 +00:00
for file in $files; do
ln -sfv $homepath/$file .
done
ln -sfv .profile .zprofile
mkdir -p .config && cd .config/
echo cd `pwd`
for file in $conffiles; do
ln -sfv $confpath/.config/$file .
done