added a funnction check for Ubuntu based

This commit is contained in:
JaKooLit 2024-09-04 11:51:43 +09:00
parent 61f7e74a80
commit a8617b8b52
2 changed files with 29 additions and 6 deletions

View File

@ -1,5 +1,8 @@
## Changelogs
## 04 Sep 2024
- added a function to check if it is Ubuntu or Based on Ubuntu and script will exit
## 28 Aug 2024
- Added final check if hyprland is installed and will give an error to user

View File

@ -10,6 +10,24 @@ fi
clear
# Function to check if the system is Ubuntu
is_ubuntu() {
# Check for 'Ubuntu' in /etc/os-release
if grep -q 'Ubuntu' /etc/os-release; then
return 0
fi
return 1
}
# Check if the system is Ubuntu
if is_ubuntu; then
echo "This script is NOT intended for Ubuntu / Ubuntu Based. Please read the README for the correct link."
exit 1
fi
clear
# ASCII art
printf "\n%.0s" {1..3}
echo " | _. |/ _ _ | o _|_ "
echo " \_| (_| o |\ (_) (_) |_ | |_ "
@ -18,20 +36,22 @@ printf "\n%.0s" {1..2}
# Welcome message
echo "$(tput setaf 6)Welcome to JaKooLit's Debian Trixie/SID Hyprland Install Script!$(tput sgr0)"
echo
echo "$(tput setaf 166)ATTENTION: Run a full system update and Reboot first!! (Highly Recommended) $(tput sgr0)"
echo "$(tput setaf 166)ATTENTION: Run a full system update and reboot first!! (Highly Recommended)$(tput sgr0)"
echo
echo "$(tput setaf 3)NOTE: You will be required to answer some questions during the installation!$(tput sgr0)"
echo
echo "$(tput setaf 3)NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprland wont start! $(tput sgr0)"
echo "$(tput setaf 3)NOTE: If you are installing on a VM, ensure to enable 3D acceleration; otherwise, Hyprland won't start!$(tput sgr0)"
echo
# Prompt user to proceed
read -p "$(tput setaf 6)Would you like to proceed? (y/n): $(tput sgr0)" proceed
if [ "$proceed" != "y" ]; then
if [[ "$proceed" != "y" ]]; then
echo "Installation aborted."
exit 1
fi
read -p "$(tput setaf 6)Have you edited your /etc/apt/sources.list? [Very Important] (y/n): $(tput sgr0)" proceed2
if [ "$proceed2" != "y" ]; then