2016-05-07 21:40:49 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# list of files/folders to symlink in homedir
|
2016-05-07 21:51:24 +02:00
|
|
|
FILES=".bash_aliases .bash_prompt .bashrc .profile bin .vimrc"
|
2016-05-07 21:40:49 +02:00
|
|
|
|
|
|
|
for FILE in $FILES; do
|
2016-05-07 22:22:39 +02:00
|
|
|
|
|
|
|
# remove old versions
|
|
|
|
if [ -d "~/$FILE" ] ; then
|
|
|
|
rm -r ~/$FILE
|
|
|
|
fi
|
|
|
|
|
|
|
|
# symlink files
|
2016-05-07 21:43:41 +02:00
|
|
|
ln -s $PWD/$FILE ~/$FILE
|
2016-05-07 21:40:49 +02:00
|
|
|
echo "$(tput setaf 64)✓$(tput sgr0) Symlink created to $(tput setaf 37)$FILE$(tput sgr0)"
|
2016-05-07 22:22:39 +02:00
|
|
|
|
2016-05-07 21:40:49 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
# source what we just created
|
|
|
|
source ~/.profile
|