Skip to content

Commit 74f99f7

Browse files
committed
fix: support for linux mint 22
1 parent d4d689a commit 74f99f7

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

docs/linux/installer.sh

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,40 +97,43 @@ TMP_DIR=$(mktemp -d)
9797
# Check Ubuntu Version Function
9898
#
9999
# Purpose:
100-
# This function checks if the current operating system is Ubuntu 24.04. It does this by reading
100+
# This function checks if the current operating system is Ubuntu 24.04 or Linux Mint 22. It does this by reading
101101
# the /etc/os-release file, which contains identification data for the operating system.
102102
#
103103
# Behavior:
104104
# 1. The function first checks if the /etc/os-release file exists.
105105
# 2. If the file exists, it sources the file to load the OS identification variables.
106-
# 3. It then checks if the ID variable is set to "ubuntu" and the VERSION_ID variable is set to "24.04".
107-
# 4. If both conditions are met, the function returns 0 (indicating success).
108-
# 5. If the conditions are not met, the function returns 1 (indicating failure).
106+
# 3. It then checks if the ID variable is set to "ubuntu" and the VERSION_ID variable is set to "24.04",
107+
# or if the ID variable is set to "linuxmint" and the VERSION_ID variable is set to "22".
108+
# 4. If either set of conditions is met, the function returns 0 (indicating success).
109+
# 5. If neither set of conditions is met, the function returns 1 (indicating failure).
109110
#
110111
# Usage:
111-
# This function can be called to determine if special handling is needed for Ubuntu 24.04, such as
112+
# This function can be called to determine if special handling is needed for Ubuntu 24.04 or Linux Mint 22, such as
112113
# installing additional libraries or making compatibility adjustments.
113114
#
114115
# Example:
115116
# if check_ubuntu_version; then
116-
# echo "Ubuntu 24.04 detected."
117+
# echo "Ubuntu 24.04 or Linux Mint 22 detected."
117118
# else
118-
# echo "Not Ubuntu 24.04."
119+
# echo "Neither Ubuntu 24.04 nor Linux Mint 22."
119120
# fi
120121
#
121122
# Notes:
122123
# - This function assumes that the /etc/os-release file follows the standard format for Linux OS
123124
# identification.
125+
124126
check_ubuntu_version() {
125127
if [ -f /etc/os-release ]; then
126128
. /etc/os-release
127-
if [[ "$ID" = "ubuntu" && "$VERSION_ID" = "24.04" ]]; then
128-
return 0 # Ubuntu 24.04 detected
129+
if [[ "$ID" = "ubuntu" && "$VERSION_ID" = "24.04" ]] || [[ "$ID" = "linuxmint" && "$VERSION_ID" = "22" ]]; then
130+
return 0 # Ubuntu 24.04 or Linux Mint 22 detected
129131
fi
130132
fi
131-
return 1 # Not Ubuntu 24.04
133+
return 1 # Neither Ubuntu 24.04 nor Linux Mint 22
132134
}
133135

136+
134137
# Create Invocation Script Function
135138
#
136139
# Purpose:

0 commit comments

Comments
 (0)