From 99a7e580e7e15b6dd6c3cd19ddff93b458db52ea Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 15 Apr 2021 23:31:12 -0400 Subject: [PATCH] check to make sure basic tools are installed for ubuntu --- setup.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/setup.sh b/setup.sh index 2c8d6e0..ffc1325 100755 --- a/setup.sh +++ b/setup.sh @@ -7,6 +7,38 @@ dir=~/dot_config backup=~/dot_config_backup files=".bashrc .vimrc .tmux.conf .psqlrc .gitconfig" +#-------------------------------------------------install debian tooling----------------------------------------------------------------------------------- + +#----------curl----------- +if [ "$(dpkg-query -W -f='${Status}' "curl" 2>/dev/null | grep -c "ok installed")" == "1" ] +then + echo "curl already installed" +else + echo "installing curl" + apt update -q4 + apt install curl -y +fi + +#----------vim----------- +if [ "$(dpkg-query -W -f='${Status}' "curl" 2>/dev/null | grep -c "ok installed")" == "1" ] +then + echo "vim already installed" +else + echo "installing vim" + apt update -q4 + apt install vim -y +fi + +#----------tmux----------- +if [ "$(dpkg-query -W -f='${Status}' "tmux" 2>/dev/null | grep -c "ok installed")" == "1" ] +then + echo "tmux already installed" +else + echo "installing tmux" + apt update -q4 + apt install tmux -y +fi + #------------------------------------------------ create the resore directory if it doesn't already exist-------------------------------------------------- if [ ! -d $backup ]