2016-10-22 05:10:25 +00:00
|
|
|
#!/bin/sh
|
2015-06-03 21:39:41 +00:00
|
|
|
|
|
|
|
SCRIPT=$(readlink -f "$0")
|
|
|
|
SCRIPTPATH=$(dirname "$SCRIPT")
|
2016-10-22 05:10:25 +00:00
|
|
|
HOST=$(hostname)
|
2015-06-03 21:39:41 +00:00
|
|
|
|
2015-06-06 22:47:56 +00:00
|
|
|
# List of the config files to install
|
2016-06-28 02:22:35 +00:00
|
|
|
FILES="vimrc zshrc gitconfig vim gitignore_global git_user"
|
|
|
|
|
2016-10-22 05:10:25 +00:00
|
|
|
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"
|
2016-06-28 02:22:35 +00:00
|
|
|
fi
|
2015-06-03 21:39:41 +00:00
|
|
|
|
2018-07-19 19:07:18 +00:00
|
|
|
# Init or update submodules
|
|
|
|
git submodule update --init --recursive
|
|
|
|
|
2018-07-20 01:09:03 +00:00
|
|
|
# Setup fast-syntax-highlighting theme customization
|
|
|
|
cp "$SCRIPTPATH/fsh_theme.zsh" "$SCRIPTPATH/current_theme.zsh"
|
|
|
|
|
2015-06-06 22:47:56 +00:00
|
|
|
# Create symbolic links in the user's home dir
|
2015-06-03 21:45:41 +00:00
|
|
|
for file in $FILES
|
|
|
|
do
|
2016-10-22 05:10:25 +00:00
|
|
|
if [ ! -e "$HOME/.${file}" ]; then
|
|
|
|
ln -s "${SCRIPTPATH}/${file}" "$HOME/.${file}"
|
2015-12-12 21:46:20 +00:00
|
|
|
fi
|
2015-06-03 21:39:41 +00:00
|
|
|
done
|