diff --git a/desktop-file-utils.changes b/desktop-file-utils.changes index 328d978..d9d9d94 100644 --- a/desktop-file-utils.changes +++ b/desktop-file-utils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Apr 20 09:04:41 UTC 2023 - Guido Berhoerster + +- suse-update-mime-defaults: + * add support for MATE desktop + * ensure C locale is set for sorting order + * fix quoting of DESTDIR + ------------------------------------------------------------------- Fri Jun 24 07:32:30 UTC 2022 - Christophe Giboudeaux diff --git a/desktop-file-utils.spec b/desktop-file-utils.spec index a09a9a4..3e386db 100644 --- a/desktop-file-utils.spec +++ b/desktop-file-utils.spec @@ -1,7 +1,7 @@ # # spec file for package desktop-file-utils # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/suse-update-mime-defaults b/suse-update-mime-defaults index 8d266ff..45128ad 100644 --- a/suse-update-mime-defaults +++ b/suse-update-mime-defaults @@ -2,7 +2,7 @@ # # suse-update-mime-defaults - create default application ordering for MIME associations # -# Copyright (C) 2012 Guido Berhoerster +# Copyright (C) 2023 Guido Berhoerster # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -16,28 +16,25 @@ # TORTIOUS ACTION, ARISING OUT OF PERFORMANCE OF THIS SOFTWARE. # -export LC_ALL=C - r= case $1 in -DESTDIR=* ) - r=`echo "$1" | sed s/^DESTDIR=//` - shift - ;; +DESTDIR=*) + r="${1#DESTDIR=}" + ;; esac # reset XDG_DATA_DIRS so it can be trusted unset XDG_DATA_DIRS if [ "${PROFILEREAD}" != "true" ]; then - . $r/etc/profile + . "$r/etc/profile" fi -# ensue the cache directory structure is in order -if [ ! -d $r/var/cache/gio-2.0 ]; then - mkdir -m 755 -p $r/var/cache/gio-2.0 -fi +export LC_ALL=C -for desktop in gnome xfce lxde pantheon budgie; do +# ensure the cache directory structure is in order +mkdir -m 755 -p "$r/var/cache/gio-2.0" + +for desktop in gnome xfce lxde pantheon budgie mate; do awk -vdesktop=${desktop} ' # print a warning to stderr function warn(msg, cmd) { @@ -125,6 +122,8 @@ BEGIN { categories_list = "GTK" } else if (desktop == "budgie") { categories_list = "GTK" + } else if (desktop == "mate") { + categories_list = "MATE,GTK" } split(categories_list, categories, /,/) root = ENVIRON["r"] @@ -256,5 +255,5 @@ BEGIN { printf("%s=%s\n", mimetype, defaults_list[mimetype]) } } -' >$r/var/cache/gio-2.0/${desktop}-mimeapps.list +' >"$r/var/cache/gio-2.0/${desktop}-mimeapps.list" done