From 5e629d7315e582f0e1d3d51721d202a14269f862 Mon Sep 17 00:00:00 2001 From: Vince Date: Tue, 20 Apr 2021 19:17:18 +0800 Subject: [PATCH] update --- lib-install.sh | 22 +++++++++++++++++++++- tweaks.sh | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/lib-install.sh b/lib-install.sh index 8c65e274..d75d4793 100755 --- a/lib-install.sh +++ b/lib-install.sh @@ -46,6 +46,26 @@ install_theme_deps() { fi } +install_gdm_deps() { + if [[ ! "$(which glib-compile-resources 2> /dev/null)" || ! "$(which xmllint 2> /dev/null)" ]]; then + echo; prompt -w "'glib2.0' 'xmllint' are required for theme installation." + + if has_command zypper; then + rootify zypper in -y glib2-devel libxml2-tools + elif has_command apt; then + rootify apt install -y libglib2.0-dev-bin libxml2-utils + elif has_command dnf; then + rootify dnf install -y glib2-devel libxml2 + elif has_command yum; then + rootify yum install -y glib2-devel libxml2 + elif has_command pacman; then + rootify pacman -S --noconfirm --needed glib2 libxml2 + else + prompt -w "INSTRUCTION: Please make sure you have installed all of the required dependencies!" + fi + fi +} + install_beggy_deps() { if [[ ! "$(which convert 2> /dev/null)" ]]; then echo; prompt -w "'imagemagick' are required for this option." @@ -59,7 +79,7 @@ install_beggy_deps() { elif has_command yum; then rootify yum install -y sassc ImageMagick elif has_command pacman; then - rootify pacman -S --noconfirm --needed sassc imagemagick + rootify pacman -S --noconfirm --needed sassc imagemagic else prompt -w "INSTRUCTION: Please make sure you have installed all of the required dependencies!" fi diff --git a/tweaks.sh b/tweaks.sh index e805e1ad..42a3f35c 100755 --- a/tweaks.sh +++ b/tweaks.sh @@ -170,7 +170,7 @@ else if [[ "${gdm}" == 'true' ]]; then echo; prompt -i "Installing '${name}' GDM theme..." - install_gdm_theme + install_gdm_deps; install_gdm_theme echo; prompt -s "Done! '${name}' GDM theme has been installed." fi