Add stowing to deploy.sh

This commit is contained in:
Ceda EI 2019-05-12 14:03:33 +05:30
parent edf96cd42c
commit 9ae7c66408
1 changed files with 14 additions and 0 deletions

View File

@ -39,6 +39,11 @@ function check_and_install() {
fi fi
} }
function stow_cfg() {
echo -e "\033[38;5;2mStowing $1"
stow $1
}
package_manager=$(find_package_manager) package_manager=$(find_package_manager)
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo -e "\033[38;5;1mCould not find package manager" >&2 echo -e "\033[38;5;1mCould not find package manager" >&2
@ -46,8 +51,17 @@ else
echo -e "\033[38;5;2mPackage manager: $package_manager" echo -e "\033[38;5;2mPackage manager: $package_manager"
fi fi
bd=$(dirname $0)
cd "$bd"
echo -e "\033[38;5;2mBase Directory: $(pwd)\n"
echo -e "\033[38;5;2mInstalling packages\n"
check_and_install stow check_and_install stow
check_and_install bash check_and_install bash
check_and_install tmux check_and_install tmux
check_and_install vim check_and_install vim
check_and_install curl
echo -e "\n\033[38;5;2mStowing config\n"
stow_cfg bash