2016-08-04 10:21:31 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-11-14 06:01:35 +00:00
|
|
|
set +e
|
2016-11-01 13:22:07 +00:00
|
|
|
|
2016-11-13 18:59:53 +00:00
|
|
|
chmod ao-rwx ~/.ssh/id_rsa
|
|
|
|
|
2016-11-14 06:01:35 +00:00
|
|
|
set -e
|
|
|
|
|
2016-08-04 10:21:31 +01:00
|
|
|
DOTFILES_PATH="$HOME/dev/dotfiles"
|
|
|
|
mkdir -pv $HOME/dev/
|
2016-11-03 20:57:00 +00:00
|
|
|
ln -vfs "$OUTER_CLONE/.gitconfig.cygwin" $HOME/.gitconfig
|
2016-11-01 13:35:53 +00:00
|
|
|
if [[ ! -d $DOTFILES_PATH ]]; then
|
|
|
|
git clone "$OUTER_CLONE" "$DOTFILES_PATH"
|
|
|
|
fi
|
|
|
|
|
2016-08-04 10:21:31 +01:00
|
|
|
cd "$DOTFILES_PATH"
|
2016-11-01 17:24:18 +00:00
|
|
|
git remote set-url origin https://github.com/cyplo/dotfiles.git
|
2016-11-03 09:43:41 +00:00
|
|
|
git fetch -p
|
|
|
|
git checkout $branch
|
2016-11-04 06:48:38 +00:00
|
|
|
set +e
|
2016-11-01 17:24:18 +00:00
|
|
|
git pull
|
2016-11-04 06:48:38 +00:00
|
|
|
set -e
|
2016-11-01 17:24:18 +00:00
|
|
|
git remote set-url origin git@github.com:cyplo/dotfiles.git
|
|
|
|
# might fail on CI where there are no secret keys
|
|
|
|
set +e
|
2016-11-01 13:35:53 +00:00
|
|
|
git pull
|
2016-11-01 17:24:18 +00:00
|
|
|
set -e
|
2016-11-03 20:18:33 +00:00
|
|
|
unset branch
|
2016-08-05 08:56:31 +01:00
|
|
|
|
|
|
|
export NOSUDO=true
|
|
|
|
export DONT_CHANGE_SHELL=true
|
|
|
|
export NORUST=true
|
2016-08-05 09:14:23 +01:00
|
|
|
export NO_GO=true
|
2016-08-05 08:56:31 +01:00
|
|
|
export DIR=$DOTFILES_PATH
|
2016-09-10 14:19:33 +01:00
|
|
|
export NOYCM=true
|
2016-08-05 08:56:31 +01:00
|
|
|
|
2016-08-05 09:27:31 +01:00
|
|
|
curl https://bootstrap.pypa.io/get-pip.py > /tmp/get-pip.py
|
|
|
|
python /tmp/get-pip.py
|
|
|
|
|
2016-11-01 18:23:13 +00:00
|
|
|
# expose all the binaries fetched during the outer build
|
|
|
|
export PATH="$OUTER_CLONE:$PATH"
|
|
|
|
|
2017-01-24 19:53:30 +00:00
|
|
|
echo "Invoking common configuration script"
|
2017-01-19 10:03:34 +00:00
|
|
|
$DIR/common/configure_fresh_system.sh
|
2017-01-24 19:53:30 +00:00
|
|
|
|
|
|
|
echo "Making symlinks"
|
2016-08-21 17:22:40 +01:00
|
|
|
ln -vfs $DIR/windows_cygwin/.minttyrc $HOME/
|
2016-11-03 20:57:00 +00:00
|
|
|
ln -vfs "$DOTFILES_PATH/.gitconfig.cygwin" $HOME/.gitconfig
|
2016-09-10 12:38:42 +01:00
|
|
|
ln -vfs $DIR/.vimrc.cygwin $HOME/.vimrc
|
2016-08-04 10:21:31 +01:00
|
|
|
|
2016-09-22 10:50:45 +01:00
|
|
|
# reinstall plugins with the new vimrc
|
2016-11-01 13:22:07 +00:00
|
|
|
echo "Reinstalling Vim plugins with the correct plugin list"
|
2016-09-22 10:50:45 +01:00
|
|
|
echo "\n" | vim +PluginInstall +qa
|
|
|
|
|