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