Finish install and add install-vim
This commit is contained in:
16
install
16
install
@@ -13,13 +13,10 @@ BASE=$(pwd)
|
|||||||
mkdir -pv bak
|
mkdir -pv bak
|
||||||
for rc in *rc *profile tmux.conf bashrc.d ; do
|
for rc in *rc *profile tmux.conf bashrc.d ; do
|
||||||
if [ ! -r $rc ] ; then
|
if [ ! -r $rc ] ; then
|
||||||
echo "$rc not present, skipping."
|
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
[ $(realpath ~/."$rc") == $BASE/$rc ]
|
[ $(realpath ~/."$rc") == $BASE/$rc ]
|
||||||
if [ $? -eq 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
echo $rc already linked
|
|
||||||
else
|
|
||||||
[ -e ~/."$rc" ] && mv -v ~/."$rc" bak/."$rc"
|
[ -e ~/."$rc" ] && mv -v ~/."$rc" bak/."$rc"
|
||||||
ln -sfv "$BASE/$rc" ~/."$rc"
|
ln -sfv "$BASE/$rc" ~/."$rc"
|
||||||
fi
|
fi
|
||||||
@@ -35,9 +32,7 @@ mkdir -p ~/bin
|
|||||||
for bin in $BASE/bin/*; do
|
for bin in $BASE/bin/*; do
|
||||||
BIN_NAME=$(basename $bin)
|
BIN_NAME=$(basename $bin)
|
||||||
[ $(realpath ~/bin/$BIN_NAME) == $bin ]
|
[ $(realpath ~/bin/$BIN_NAME) == $bin ]
|
||||||
if [ $? -eq 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
echo $BIN_NAME already linked
|
|
||||||
else
|
|
||||||
ln -svf "$bin" ~/bin
|
ln -svf "$bin" ~/bin
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -78,6 +73,9 @@ git config --global user.name "Paul Walker"
|
|||||||
# git config --global commit.gpgsign true
|
# git config --global commit.gpgsign true
|
||||||
|
|
||||||
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||||
tmux source-file ~/.tmux.conf
|
if [ "$TMUX" != "" ] ; then
|
||||||
|
# If we're currently in tmux, source the new file.
|
||||||
|
tmux source-file ~/.tmux.conf
|
||||||
|
fi
|
||||||
|
|
||||||
# ./install-vim
|
./install-vim
|
||||||
|
|||||||
30
install-vim
Executable file
30
install-vim
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd $(dirname $BASH_SOURCE)
|
||||||
|
BASE=$(pwd)
|
||||||
|
|
||||||
|
# export GIT_SSL_NO_VERIFY=true
|
||||||
|
if [ ! -f ~/.vim/autoload/plug.vim ] ; then
|
||||||
|
mkdir -p ~/.vim/autoload
|
||||||
|
curl -fLo ~/.vim/autoload/plug.vim https://raw.github.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
else
|
||||||
|
echo "Plug already installed."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# vimrc - may already have been handled by install
|
||||||
|
[ $(realpath ~/.vimrc) == $BASE/vimrc ]
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
mkdir -p bak
|
||||||
|
echo mv -v ~/.vimrc bak/.vimrc 2> /dev/null
|
||||||
|
echo ln -svf $BASE/vimrc ~/.vimrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# nvim
|
||||||
|
mkdir -p ~/.config/nvim/autoload
|
||||||
|
ln -sf $BASE/vimrc ~/.config/nvim/init.vim
|
||||||
|
ln -sf ~/.vim/autoload/plug.vim ~/.config/nvim/autoload/
|
||||||
|
|
||||||
|
mkdir -p ~/.config/nvim
|
||||||
|
ln -sf $BASE/coc-settings.json ~/.config/nvim/coc-settings.json
|
||||||
|
|
||||||
|
vim +PlugInstall +qall
|
||||||
Reference in New Issue
Block a user