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
|
## Changelogs
|
||||||
|
|
||||||
|
## 04 Sep 2024
|
||||||
|
- added a function to check if it is Ubuntu or Based on Ubuntu and script will exit
|
||||||
|
|
||||||
## 28 Aug 2024
|
## 28 Aug 2024
|
||||||
- Added final check if hyprland is installed and will give an error to user
|
- Added final check if hyprland is installed and will give an error to user
|
||||||
|
|
||||||
|
|||||||
28
install.sh
28
install.sh
@ -10,6 +10,24 @@ fi
|
|||||||
|
|
||||||
clear
|
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}
|
printf "\n%.0s" {1..3}
|
||||||
echo " | _. |/ _ _ | o _|_ "
|
echo " | _. |/ _ _ | o _|_ "
|
||||||
echo " \_| (_| o |\ (_) (_) |_ | |_ "
|
echo " \_| (_| o |\ (_) (_) |_ | |_ "
|
||||||
@ -18,20 +36,22 @@ printf "\n%.0s" {1..2}
|
|||||||
# Welcome message
|
# Welcome message
|
||||||
echo "$(tput setaf 6)Welcome to JaKooLit's Debian Trixie/SID Hyprland Install Script!$(tput sgr0)"
|
echo "$(tput setaf 6)Welcome to JaKooLit's Debian Trixie/SID Hyprland Install Script!$(tput sgr0)"
|
||||||
echo
|
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
|
||||||
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
|
||||||
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
|
echo
|
||||||
|
|
||||||
|
# Prompt user to proceed
|
||||||
read -p "$(tput setaf 6)Would you like to proceed? (y/n): $(tput sgr0)" 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."
|
echo "Installation aborted."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
read -p "$(tput setaf 6)Have you edited your /etc/apt/sources.list? [Very Important] (y/n): $(tput sgr0)" proceed2
|
read -p "$(tput setaf 6)Have you edited your /etc/apt/sources.list? [Very Important] (y/n): $(tput sgr0)" proceed2
|
||||||
|
|
||||||
if [ "$proceed2" != "y" ]; then
|
if [ "$proceed2" != "y" ]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user