mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2025-12-21 10:20:12 +01:00
added a funnction check for Ubuntu based
This commit is contained in:
parent
61f7e74a80
commit
a8617b8b52
@ -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
|
||||
|
||||
|
||||
32
install.sh
32
install.sh
@ -10,28 +10,48 @@ fi
|
||||
|
||||
clear
|
||||
|
||||
printf "\n%.0s" {1..3}
|
||||
# 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 |\ (_) (_) |_ | |_ "
|
||||
printf "\n%.0s" {1..2}
|
||||
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 "$(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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user