From 0beaa1738beaa24a9ad7757e220f3632a7da4bae Mon Sep 17 00:00:00 2001 From: fiftydinar <65243233+fiftydinar@users.noreply.github.com> Date: Tue, 22 Apr 2025 18:45:22 +0200 Subject: [PATCH] fix(gnome-extensions): Non-installed languages regression Regression was with this fix I thought was working: https://github.com/blue-build/modules/commit/4ac40ed0427d74f5d21b931d271c1cedbf1ff0a6 --- modules/gnome-extensions/gnome-extensions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gnome-extensions/gnome-extensions.sh b/modules/gnome-extensions/gnome-extensions.sh index 78e9e93..4921bf4 100644 --- a/modules/gnome-extensions/gnome-extensions.sh +++ b/modules/gnome-extensions/gnome-extensions.sh @@ -117,7 +117,7 @@ if [[ ${#INSTALL[@]} -gt 0 ]]; then # So that's why I made a check for directory # I made an additional check if language files are available, in case if extension is packaged with an empty folder, like with Default Workspace extension if [[ -d "${TMP_DIR}/locale" ]]; then - if ls "${TMP_DIR}/locale/"*.mo 1> /dev/null 2>&1; then + if find "${TMP_DIR}/locale/" -type f -name "*.mo" | grep -q .; then echo "Installing language extension files" install -d -m 0755 "/usr/share/locale/" cp -r "${TMP_DIR}/locale"/* "/usr/share/locale/" @@ -226,7 +226,7 @@ if [[ ${#INSTALL[@]} -gt 0 ]] && ! "${LEGACY}"; then # So that's why I made a check for directory # I made an additional check if language files are available, in case if extension is packaged with an empty folder, like with Default Workspace extension if [[ -d "${TMP_DIR}/locale" ]]; then - if ls "${TMP_DIR}/locale/"*.mo 1> /dev/null 2>&1; then + if find "${TMP_DIR}/locale/" -type f -name "*.mo" | grep -q .; then echo "Installing language extension files" install -d -m 0755 "/usr/share/locale/" cp -r "${TMP_DIR}/locale"/* "/usr/share/locale/"