From cae26c90cc711b6b9a7b80718d505b76bf0f9172 Mon Sep 17 00:00:00 2001 From: Corrado Primier Date: Sat, 22 Feb 2020 00:43:22 +0000 Subject: [PATCH] Add some logging --- bin/scriptamanent | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/bin/scriptamanent b/bin/scriptamanent index 4c27ed9..36c6449 100755 --- a/bin/scriptamanent +++ b/bin/scriptamanent @@ -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"