updated install module

This commit is contained in:
JaKooLit 2023-10-14 01:52:23 +09:00
parent 8e707ea35f
commit b68318982c
10 changed files with 51 additions and 52 deletions

View File

@ -113,17 +113,17 @@ LOG="install-$(date +%d-%H%M%S)_dependencies.log"
set -e
# Function for installing packages on Debian/Ubuntu
# Function for installing packages
install_package() {
# Checking if package is already installed
if dpkg -l | grep -q -w "$1"; then
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "${OK} $1 is already installed. Skipping..."
else
# Package not installed
echo -e "${NOTE} Installing $1 ..."
sudo apt-get install -y "$1" >> "$LOG" 2>&1
# Check if the package was installed successfully
if dpkg -l | grep -q -w "$1"; then
sudo apt-get install -y "$1" 2>&1 | tee -a "$LOG"
# Making sure the package is installed
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "\e[1A\e[K${OK} $1 was installed."
else
# Something is missing, exiting to review the log
@ -133,6 +133,7 @@ install_package() {
fi
}
# Installation of main dependencies
printf "\n%s - Installing main dependencies.... \n" "${NOTE}"

View File

@ -73,17 +73,17 @@ LOG="install-$(date +%d-%H%M%S)_hypr-pkgs.log"
set -e
# Function for installing packages on Debian/Ubuntu
# Function for installing packages
install_package() {
# Checking if package is already installed
if dpkg -l | grep -q -w "$1"; then
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "${OK} $1 is already installed. Skipping..."
else
# Package not installed
echo -e "${NOTE} Installing $1 ..."
sudo apt-get install -y "$1" >> "$LOG" 2>&1
# Check if the package was installed successfully
if dpkg -l | grep -q -w "$1"; then
sudo apt-get install -y "$1" 2>&1 | tee -a "$LOG"
# Making sure the package is installed
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "\e[1A\e[K${OK} $1 was installed."
else
# Something is missing, exiting to review the log
@ -93,7 +93,6 @@ install_package() {
fi
}
# Installation of main components
printf "\n%s - Installing hyprland packages.... \n" "${NOTE}"

View File

@ -30,17 +30,17 @@ LOG="install-$(date +%d-%H%M%S)_bluetooth.log"
# Set the script to exit on error
set -e
# Function for installing packages on Debian/Ubuntu
# Function for installing packages
install_package() {
# Checking if package is already installed
if dpkg -l | grep -q -w "$1"; then
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "${OK} $1 is already installed. Skipping..."
else
# Package not installed
echo -e "${NOTE} Installing $1 ..."
sudo apt-get install -y "$1" >> "$LOG" 2>&1
# Check if the package was installed successfully
if dpkg -l | grep -q -w "$1"; then
sudo apt-get install -y "$1" 2>&1 | tee -a "$LOG"
# Making sure the package is installed
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "\e[1A\e[K${OK} $1 was installed."
else
# Something is missing, exiting to review the log

View File

@ -33,17 +33,17 @@ LOG="install-$(date +%d-%H%M%S)_fonts.log"
set -e
# Function for installing packages on Debian/Ubuntu
# Function for installing packages
install_package() {
# Checking if package is already installed
if dpkg -l | grep -q -w "$1"; then
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "${OK} $1 is already installed. Skipping..."
else
# Package not installed
echo -e "${NOTE} Installing $1 ..."
sudo apt-get install -y "$1" >> "$LOG" 2>&1
# Check if the package was installed successfully
if dpkg -l | grep -q -w "$1"; then
sudo apt-get install -y "$1" 2>&1 | tee -a "$LOG"
# Making sure the package is installed
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "\e[1A\e[K${OK} $1 was installed."
else
# Something is missing, exiting to review the log

View File

@ -23,17 +23,17 @@ LOG="install-$(date +%d-%H%M%S)_themes.log"
set -e
# Function for installing packages on Debian/Ubuntu
# Function for installing packages
install_package() {
# Checking if package is already installed
if dpkg -l | grep -q -w "$1"; then
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "${OK} $1 is already installed. Skipping..."
else
# Package not installed
echo -e "${NOTE} Installing $1 ..."
sudo apt-get install -y "$1" >> "$LOG" 2>&1
# Check if the package was installed successfully
if dpkg -l | grep -q -w "$1"; then
sudo apt-get install -y "$1" 2>&1 | tee -a "$LOG"
# Making sure the package is installed
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "\e[1A\e[K${OK} $1 was installed."
else
# Something is missing, exiting to review the log

View File

@ -46,17 +46,17 @@ echo "deb http://deb.debian.org/debian/ trixie main contrib non-free non-free-fi
# Update the package list
sudo apt update
# Function for installing packages on Debian/Ubuntu
# Function for installing packages
install_package() {
# Checking if package is already installed
if dpkg -l | grep -q -w "$1"; then
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "${OK} $1 is already installed. Skipping..."
else
# Package not installed
echo -e "${NOTE} Installing $1 ..."
sudo apt-get install -y "$1" >> "$LOG" 2>&1
# Check if the package was installed successfully
if dpkg -l | grep -q -w "$1"; then
sudo apt-get install -y "$1" 2>&1 | tee -a "$LOG"
# Making sure the package is installed
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "\e[1A\e[K${OK} $1 was installed."
else
# Something is missing, exiting to review the log

View File

@ -29,17 +29,17 @@ RESET=$(tput sgr0)
# Set the name of the log file to include the current date and time
LOG="install-$(date +'%d-%H%M%S')_nwg-look.log"
# Function for installing packages on Debian/Ubuntu
# Function for installing packages
install_package() {
# Checking if package is already installed
if dpkg -l | grep -q -w "$1"; then
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "${OK} $1 is already installed. Skipping..."
else
# Package not installed
echo -e "${NOTE} Installing $1 ..."
sudo apt-get install -y "$1" >> "$LOG" 2>&1
# Check if the package was installed successfully
if dpkg -l | grep -q -w "$1"; then
sudo apt-get install -y "$1" 2>&1 | tee -a "$LOG"
# Making sure the package is installed
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "\e[1A\e[K${OK} $1 was installed."
else
# Something is missing, exiting to review the log

View File

@ -38,17 +38,17 @@ LOG="install-$(date +%d-%H%M%S)_sddm.log"
set -e
# Function for installing packages on Debian/Ubuntu
# Function for installing packages
install_package() {
# Checking if package is already installed
if dpkg -l | grep -q -w "$1"; then
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "${OK} $1 is already installed. Skipping..."
else
# Package not installed
echo -e "${NOTE} Installing $1 ..."
sudo apt-get install -y "$1" >> "$LOG" 2>&1
# Check if the package was installed successfully
if dpkg -l | grep -q -w "$1"; then
sudo apt-get install -y "$1" 2>&1 | tee -a "$LOG"
# Making sure the package is installed
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "\e[1A\e[K${OK} $1 was installed."
else
# Something is missing, exiting to review the log

View File

@ -31,17 +31,17 @@ LOG="install-$(date +%d-%H%M%S)_thunar.log"
set -e
# Function for installing packages on Debian/Ubuntu
# Function for installing packages
install_package() {
# Checking if package is already installed
if dpkg -l | grep -q -w "$1"; then
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "${OK} $1 is already installed. Skipping..."
else
# Package not installed
echo -e "${NOTE} Installing $1 ..."
sudo apt-get install -y "$1" >> "$LOG" 2>&1
# Check if the package was installed successfully
if dpkg -l | grep -q -w "$1"; then
sudo apt-get install -y "$1" 2>&1 | tee -a "$LOG"
# Making sure the package is installed
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "\e[1A\e[K${OK} $1 was installed."
else
# Something is missing, exiting to review the log

View File

@ -24,17 +24,17 @@ LOG="install-$(date +%d-%H%M%S)_zsh.log"
set -e
# Function for installing packages on Debian/Ubuntu
# Function for installing packages
install_package() {
# Checking if package is already installed
if dpkg -l | grep -q -w "$1"; then
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "${OK} $1 is already installed. Skipping..."
else
# Package not installed
echo -e "${NOTE} Installing $1 ..."
sudo apt-get install -y "$1" >> "$LOG" 2>&1
# Check if the package was installed successfully
if dpkg -l | grep -q -w "$1"; then
sudo apt-get install -y "$1" 2>&1 | tee -a "$LOG"
# Making sure the package is installed
if sudo dpkg -l | grep -q "^ii $1 " ; then
echo -e "\e[1A\e[K${OK} $1 was installed."
else
# Something is missing, exiting to review the log
@ -44,7 +44,6 @@ install_package() {
fi
}
# zsh and oh-my-zsh
printf "${WARN} #### IF YOU HAVE ALREADY ZSH AND OH MY ZSH, YOU SHOULD CHOOSE NO HERE #########\n"
printf "${WARN} ### ------------------------------------------------------------------------------------------------------------------------###\n"