A fork of the Materia GTK theme.

Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

install.sh: Make install_gdm function more robust and consistent

by roundabout, Saturday, 16 June 2018, 03:31:43 (1529119903), pushed by roundabout, Sunday, 11 May 2025, 13:22:26 (1746969746)

Author identity: nana-4 <hnmaigo@gmail.com>

dcde7613dc1df7ab2940c13c5e18bddf7ac07cc3

install.sh

@@ -125,26 +125,30 @@ install() {

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              cp -r "$SRC_DIR/xfwm4/assets${ELSE_LIGHT:-}"                                  "$THEME_DIR/xfwm4/assets"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        # Bakup and install files related to GDM theme
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            install_gdm() {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              local THEME_DIR=$1/$2$3$4
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              local GS_THEME_FILE=/usr/share/gnome-shell/gnome-shell-theme.gresource
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              local UBUNTU_THEME_FILE=/usr/share/gnome-shell/theme/ubuntu.css
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          # bakup and install files related to gdm theme
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          if [[ ! -f "$GS_THEME_FILE.bak" ]]; then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            cp -af "$GS_THEME_FILE" "$GS_THEME_FILE.bak"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          if [[ -f "$GS_THEME_FILE" ]] && [[ "$(which glib-compile-resources 2> /dev/null)" ]]; then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            echo "Installing '$GS_THEME_FILE'..."
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            cp -an "$GS_THEME_FILE" "$GS_THEME_FILE.bak"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            glib-compile-resources \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              --sourcedir="$THEME_DIR/gnome-shell" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              --target="$GS_THEME_FILE" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              "$THEME_DIR/gnome-shell/gnome-shell-theme.gresource.xml"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          else
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            echo
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            echo "ERROR: Failed to install '$GS_THEME_FILE'"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            exit 1
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              fi
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              if [[ -f "$UBUNTU_THEME_FILE" ]]; then
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            if [[ ! -f "$UBUNTU_THEME_FILE.bak" ]]; then
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              cp -af "$UBUNTU_THEME_FILE" "$UBUNTU_THEME_FILE.bak"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            fi
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            echo "Installing '$UBUNTU_THEME_FILE'..."
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            cp -an "$UBUNTU_THEME_FILE" "$UBUNTU_THEME_FILE.bak"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                cp -af "$THEME_DIR/gnome-shell/gnome-shell.css" "$UBUNTU_THEME_FILE"
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              fi
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          echo "Installing '$GS_THEME_FILE'..."
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          glib-compile-resources \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            --sourcedir="$THEME_DIR/gnome-shell" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            --target="$GS_THEME_FILE" \
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            "$THEME_DIR/gnome-shell/gnome-shell-theme.gresource.xml"
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            while [[ "$#" -gt 0 ]]; do