scriptamanent/bin/scriptamanent

30 lines
621 B
Bash
Executable File

#!/bin/sh
set -u
SCRIPTDIR=`dirname \`realpath "${0}"\``
REPODIR=`realpath ${SCRIPTDIR}/..`
git=`command -v git`
# basic
"${git}" -C "${REPODIR}" submodule init
# scripts
mkdir -p "${HOME}/bin"
for script in `ls "${SCRIPTDIR}"` ; do
ln -s "${SCRIPTDIR}/${script}" "${HOME}/bin/`basename \"${script}\"`"
done
# bash
ln -s "${REPODIR}/.bashrc" "${HOME}"
# tmux
ln -s "${REPODIR}/.tmux.conf" "${HOME}"
mkdir -p "${HOME}/tmux/plugins"
"${git}" clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# vim
ln -s "${REPODIR}/.vim/" "${HOME}"
ln -s "${REPODIR}/.vimrc" "${HOME}"
"${HOME}/bin/update-vim-plugins"