From 329e8efaec0f2e28af98738d292b850d12b823ad Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Sat, 23 Apr 2022 17:58:25 +0800 Subject: [PATCH] Fixed #51 --- install.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 8fd137f0..b3032eda 100755 --- a/install.sh +++ b/install.sh @@ -28,20 +28,17 @@ COLOR_VARIANTS=('' '-light' '-dark') SIZE_VARIANTS=('' '-compact') if [[ "$(command -v gnome-shell)" ]]; then + gnome-shell --version SHELL_VERSION="$(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f -1)" if [[ "${SHELL_VERSION:-}" -ge "42" ]]; then - GS_VERSION="42" - echo "gnome-shell 42" + GS_VERSION="42-0" elif [[ "${SHELL_VERSION:-}" -ge "40" ]]; then - GS_VERSION="40" - echo "gnome-shell 40" + GS_VERSION="40-0" else - GS_VERSION="38" - echo "gnome-shell 38" + GS_VERSION="3-28" fi else echo "'gnome-shell' not found, using styles for last gnome-shell version available." - GS_VERSION="42" fi usage() { @@ -425,10 +422,10 @@ normal_winbutton() { } gnome_shell_version() { - sed -i "/\widgets/s/40/${GS_VERSION}/" ${SRC_DIR}/sass/gnome-shell/_common-temp.scss + sed -i "/\widgets/s/40-0/${GS_VERSION}/" ${SRC_DIR}/sass/gnome-shell/_common-temp.scss - if [[ "${GS_VERSION}" == '38' ]]; then - sed -i "/\extensions/s/40-0/3-28/" ${SRC_DIR}/sass/gnome-shell/_common-temp.scss + if [[ "${GS_VERSION}" == '3-28' ]]; then + sed -i "/\extensions/s/40-0/${GS_VERSION}/" ${SRC_DIR}/sass/gnome-shell/_common-temp.scss fi }