#!/bin/sh

## This script handles the installations for Debian-based systems.
## It is run by main_install.sh

if [ "$OS" != 'debian' ]; then
  echo "${RED}The OS wasn't defined as Debian. Quitting...${NC}"
  exit 1
else
  echo "${GREEN}Installing for Debian-based systems${NC}"
fi

sudo apt update

echo "Installing Python venv..."
if sudo apt install python3-venv; then
  echo "${GREEN}Successfully installed Python venv${NC}"
else
  echo "${RED}Didn't install Python venv${NC}"
fi

echo "Installing Keepass..."
if sudo apt install keepass2; then
  echo "${GREEN}Successfully installed Keepass${NC}"
else
  echo "${RED}Didn't install Keepass${NC}"
fi

echo "Installing ProtonVPN..."
if sudo apt install -y openvpn dialog python3-pip python3-setuptools && sudo pip3 install protonvpn-cli; then
  echo "${GREEN}Successfully installed ProtonVPN${NC}"
else
  echo "${RED}Didn't install ProtonVPN${NC}"
fi

echo "Installing Git..."
if sudo apt install git; then
  echo "${GREEN}Successfully installed Git${NC}"
else
  echo "${RED}Didn't install Git${NC}"
fi

echo "Installing Vim..."
# I use gvim instead of vim because the clipboard is compiled in gvim
if sudo apt install vim-gtk; then
  echo "${GREEN}Successfully installed Vim${NC}"
else
  echo "${RED}Didn't install Vim${NC}"
fi

echo "Installing miscellaneous things..."
if sudo apt install curl wget; then
  echo "${GREEN}Successfully installed curl and wget${NC}"
else
  echo "${RED}Didn't install curl and wget${NC}"
fi
