My dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
569 B

#!/bin/bash
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
HOST=`hostname`
# List of the config files to install
FILES="vimrc zshrc gitconfig vim gitignore_global git_user"
if [[ ! -e $HOME/.git_user ]]
then
cp $SCRIPTPATH/git_user.def $SCRIPTPATH/git_user
sed -i -e "s/{username}/$USER/" $SCRIPTPATH/git_user
sed -i -e "s/{email}/$USER@$HOST/" $SCRIPTPATH/git_user
fi
# Create symbolic links in the user's home dir
for file in $FILES
do
if [ ! -e $HOME/.${file} ]
then
ln -s ${SCRIPTPATH}/${file} $HOME/.${file}
fi
done