mirror of
https://github.com/aljazceru/omakub.git
synced 2025-12-19 13:34:19 +01:00
Fix indention
This commit is contained in:
@@ -2,27 +2,26 @@
|
|||||||
|
|
||||||
# Function to check if running on Ubuntu 24.04 or higher
|
# Function to check if running on Ubuntu 24.04 or higher
|
||||||
check_ubuntu_version() {
|
check_ubuntu_version() {
|
||||||
if [ -f /etc/os-release ]; then
|
if [ -f /etc/os-release ]; then
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
if [ "$ID" = "ubuntu" ]; then
|
if [ "$ID" = "ubuntu" ]; then
|
||||||
if awk -v ver="$VERSION_ID" 'BEGIN {exit !(ver >= 24.04)}'; then
|
if awk -v ver="$VERSION_ID" 'BEGIN {exit !(ver >= 24.04)}'; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
echo "Error: Ubuntu version must be 24.04 or higher. Current version: $VERSION_ID" >&2
|
echo "Error: Ubuntu version must be 24.04 or higher. Current version: $VERSION_ID" >&2
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Error: This script must be run on Ubuntu. Current OS: $ID" >&2
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Error: Unable to determine OS. /etc/os-release file not found." >&2
|
|
||||||
return 1
|
return 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Error: This script must be run on Ubuntu. Current OS: $ID" >&2
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "Error: Unable to determine OS. /etc/os-release file not found." >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! check_ubuntu_version; then
|
if ! check_ubuntu_version; then
|
||||||
echo "Script execution failed due to system requirements not being met." >&2
|
echo "Script execution failed due to system requirements not being met." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user