From 1e883519643368ec04a4caeb3389613c7d87fa09 Mon Sep 17 00:00:00 2001 From: RX6900XT Date: Mon, 13 Nov 2023 10:19:37 +0000 Subject: [PATCH 1/3] =?UTF-8?q?update=20src/etc/profile.d/bookworm-compata?= =?UTF-8?q?bility-mode.sh.=20=E9=92=88=E5=AF=B9ubuntu=E5=8F=91=E8=A1=8C?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=81=9A=E5=87=BA=E4=BF=AE=E6=AD=A3=EF=BC=8C?= =?UTF-8?q?=E5=9C=A8deepin=E4=B8=8B=E4=B9=9F=E8=83=BD=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: RX6900XT --- .../profile.d/bookworm-compatability-mode.sh | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/etc/profile.d/bookworm-compatability-mode.sh b/src/etc/profile.d/bookworm-compatability-mode.sh index e255bba..d9e1297 100755 --- a/src/etc/profile.d/bookworm-compatability-mode.sh +++ b/src/etc/profile.d/bookworm-compatability-mode.sh @@ -1,4 +1,18 @@ -export XDG_DATA_DIRS -APP_ROOT="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share" -XDG_DATA_DIRS="${APP_ROOT}:/usr/local/share:/usr/share" -export APP_ROOT +# shellcheck shell=sh + + + +# Ensure base distro defaults xdg path are set if nothing filed up some +# defaults yet. +if [ -z "$XDG_DATA_DIRS" ]; then + export XDG_DATA_DIRS="/usr/local/share:/usr/share" +fi + +# Desktop files (used by desktop environments within both X11 and Wayland) are +# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for +# snappy applications' desktop files. +bcm_path="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/" +if [ -n "${XDG_DATA_DIRS##*${bcm_path}}" ] && [ -n "${XDG_DATA_DIRS##*${bcm_path}:*}" ]; then + export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${bcm_path}" +fi + From e2769c15d2bc9e6f6db9623f6bbcfd73ad096b82 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 13 Nov 2023 10:36:46 +0000 Subject: [PATCH 2/3] update src/etc/profile.d/bookworm-compatability-mode.sh. Signed-off-by: shenmo --- src/etc/profile.d/bookworm-compatability-mode.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/etc/profile.d/bookworm-compatability-mode.sh b/src/etc/profile.d/bookworm-compatability-mode.sh index d9e1297..75dfdd9 100755 --- a/src/etc/profile.d/bookworm-compatability-mode.sh +++ b/src/etc/profile.d/bookworm-compatability-mode.sh @@ -11,8 +11,8 @@ fi # Desktop files (used by desktop environments within both X11 and Wayland) are # looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for # snappy applications' desktop files. -bcm_path="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/" -if [ -n "${XDG_DATA_DIRS##*${bcm_path}}" ] && [ -n "${XDG_DATA_DIRS##*${bcm_path}:*}" ]; then - export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${bcm_path}" +ACE_path="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/" +if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then + export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}" fi From c26bf5aa0670dd224bac3511e233454767f1a5a8 Mon Sep 17 00:00:00 2001 From: RX6900XT Date: Mon, 13 Nov 2023 10:57:35 +0000 Subject: [PATCH 3/3] update src/etc/profile.d/bookworm-compatability-mode.sh. Signed-off-by: RX6900XT --- src/etc/profile.d/bookworm-compatability-mode.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/etc/profile.d/bookworm-compatability-mode.sh b/src/etc/profile.d/bookworm-compatability-mode.sh index 75dfdd9..a2b5a49 100755 --- a/src/etc/profile.d/bookworm-compatability-mode.sh +++ b/src/etc/profile.d/bookworm-compatability-mode.sh @@ -9,8 +9,7 @@ if [ -z "$XDG_DATA_DIRS" ]; then fi # Desktop files (used by desktop environments within both X11 and Wayland) are -# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for -# snappy applications' desktop files. +# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE ACE_path="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/" if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}"