check to make sure basic tools are installed for ubuntu

This commit is contained in:
Paul Trowbridge 2021-04-15 23:31:12 -04:00
parent 7e29a16a96
commit 99a7e580e7

View File

@ -7,6 +7,38 @@ dir=~/dot_config
backup=~/dot_config_backup backup=~/dot_config_backup
files=".bashrc .vimrc .tmux.conf .psqlrc .gitconfig" 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-------------------------------------------------- #------------------------------------------------ create the resore directory if it doesn't already exist--------------------------------------------------
if [ ! -d $backup ] if [ ! -d $backup ]