|
|
@ -2,17 +2,23 @@ |
|
|
|
|
|
|
|
|
SCRIPT=$(readlink -f "$0") |
|
|
SCRIPT=$(readlink -f "$0") |
|
|
SCRIPTPATH=$(dirname "$SCRIPT") |
|
|
SCRIPTPATH=$(dirname "$SCRIPT") |
|
|
|
|
|
HOST=`hostname` |
|
|
|
|
|
|
|
|
# List of the config files to install |
|
|
# List of the config files to install |
|
|
FILES="vimrc zshrc gitconfig vim gitignore_global" |
|
|
FILES="vimrc zshrc gitconfig vim gitignore_global git_user" |
|
|
|
|
|
|
|
|
|
|
|
if [[ ! $1 == "--check" ]] |
|
|
|
|
|
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 |
|
|
# Create symbolic links in the user's home dir |
|
|
cd $HOME |
|
|
|
|
|
for file in $FILES |
|
|
for file in $FILES |
|
|
do |
|
|
do |
|
|
if [ ! -f .${file} ] |
|
|
if [ ! -e $HOME/.${file} ] |
|
|
then |
|
|
then |
|
|
ln -s ${SCRIPTPATH}/${file} .${file} |
|
|
ln -s ${SCRIPTPATH}/${file} $HOME/.${file} |
|
|
fi |
|
|
fi |
|
|
done |
|
|
done |
|
|
cd - |
|
|
|
|
|
|