Detect Ubuntu flavors (#1507)

This commit is contained in:
Michael Straube 2020-07-17 21:05:58 +02:00 committed by GitHub
parent a4bf721014
commit 47d8dbcec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 3 deletions

View File

@ -1087,6 +1087,18 @@ get_distro() {
distro=$(trim_quotes "$distro") distro=$(trim_quotes "$distro")
distro=${distro/NAME=} distro=${distro/NAME=}
# Get Ubuntu flavor.
if [[ $distro == "Ubuntu"* ]]; then
case $XDG_CONFIG_DIRS in
*"plasma"*) distro=${distro/Ubuntu/Kubuntu} ;;
*"mate"*) distro=${distro/Ubuntu/Ubuntu MATE} ;;
*"xubuntu"*) distro=${distro/Ubuntu/Xubuntu} ;;
*"Lubuntu"*) distro=${distro/Ubuntu/Lubuntu} ;;
*"budgie"*) distro=${distro/Ubuntu/Ubuntu Budgie} ;;
*"studio"*) distro=${distro/Ubuntu/Ubuntu Studio} ;;
esac
fi
;; ;;
"Mac OS X"|"macOS") "Mac OS X"|"macOS")
@ -9890,7 +9902,7 @@ ${c1} ▀█████████ ███████${c2}███▀
EOF EOF
;; ;;
"Ubuntu-Budgie"*) "Ubuntu Budgie"* | "Ubuntu-Budgie"*)
set_colors 4 7 1 set_colors 4 7 1
read -rd '' ascii_data <<'EOF' read -rd '' ascii_data <<'EOF'
${c2} ./oydmMMMMMMmdyo/. ${c2} ./oydmMMMMMMmdyo/.
@ -9938,7 +9950,7 @@ ${c4} `soooo. .oooo`
EOF EOF
;; ;;
"Ubuntu-MATE"*) "Ubuntu MATE"* | "Ubuntu-MATE"*)
set_colors 2 7 set_colors 2 7
read -rd '' ascii_data <<'EOF' read -rd '' ascii_data <<'EOF'
${c1} `:+shmNNMMNNmhs+:` ${c1} `:+shmNNMMNNmhs+:`
@ -9988,7 +10000,7 @@ ${c3} `oo++.
EOF EOF
;; ;;
"Ubuntu-Studio") "Ubuntu Studio"* | "Ubuntu-Studio")
set_colors 6 7 set_colors 6 7
read -rd '' ascii_data <<'EOF' read -rd '' ascii_data <<'EOF'
${c1} ..-::::::-.` ${c1} ..-::::::-.`