Add some logging
This commit is contained in:
parent
8e66f28b23
commit
cae26c90cc
@ -6,24 +6,44 @@ REPODIR=`realpath ${SCRIPTDIR}/..`
|
||||
|
||||
git=`command -v git`
|
||||
|
||||
function msg {
|
||||
echo "`tput bold`${*}`tput sgr0`"
|
||||
}
|
||||
|
||||
function info {
|
||||
echo "`tput bold``tput setaf 2`[INFO]`tput sgr0` `msg ${*}`"
|
||||
}
|
||||
|
||||
function err {
|
||||
echo "`tput bold``tput setaf 1`[ERROR]`tput sgr0` `msg ${*}`"
|
||||
}
|
||||
|
||||
# basic
|
||||
info "Initializing submodules"
|
||||
"${git}" -C "${REPODIR}" submodule init
|
||||
|
||||
# scripts
|
||||
info "Deploying scripts to ~/bin"
|
||||
mkdir -p "${HOME}/bin"
|
||||
for script in `ls "${SCRIPTDIR}"` ; do
|
||||
ln -s "${SCRIPTDIR}/${script}" "${HOME}/bin/`basename \"${script}\"`"
|
||||
done
|
||||
|
||||
# bash
|
||||
info "Deploying bash configuration"
|
||||
ln -s "${REPODIR}/.bashrc" "${HOME}"
|
||||
|
||||
# tmux
|
||||
info "Configuring tmux"
|
||||
ln -s "${REPODIR}/.tmux.conf" "${HOME}"
|
||||
mkdir -p "${HOME}/tmux/plugins"
|
||||
"${git}" clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||
|
||||
# vim
|
||||
info "Configuring vim"
|
||||
ln -s "${REPODIR}/.vim/" "${HOME}"
|
||||
ln -s "${REPODIR}/.vimrc" "${HOME}"
|
||||
info "Updating vim plugins"
|
||||
"${HOME}/bin/update-vim-plugins"
|
||||
|
||||
info "Verba volant, scripta manent"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user