use data dir to avoid errors in DATA_DIRS

This commit is contained in:
2025-10-24 11:58:53 +08:00
parent 03ae4e6129
commit e088cca383
4 changed files with 6 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ 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 ACE
ACE_path="/var/lib/apm/apm/files/ace-env/usr/share/"
ACE_path="/var/lib/apm/apm/files/ace-env/amber-ce-tools/data-dir/"
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
fi

View File

@@ -9,7 +9,7 @@ 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 ACE
ACE_path="/var/lib/apm/apm/files/ace-env/usr/share/"
ACE_path="/var/lib/apm/apm/files/ace-env/amber-ce-tools/data-dir/"
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
fi

View File

@@ -10,7 +10,7 @@ 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 ACE
ACE_path="/var/lib/apm/apm/files/ace-env/usr/share/"
ACE_path="/var/lib/apm/apm/files/ace-env/amber-ce-tools/data-dir/"
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
fi

View File

@@ -111,6 +111,9 @@ sudo -u $(get_current_user) bwrap --dev-bind $chrootEnvPath/ / \
locale-gen
bookworm-run update-locale LANG=$LANG
chown -R root $chrootEnvPath
mkdir -p $chrootEnvPath/amber-ce-tools/data-dir
ln -sv ../../usr/share/applications $chrootEnvPath/amber-ce-tools/data-dir/applications/
ln -sv ../../usr/share/icons $chrootEnvPath/amber-ce-tools/data-dir/icons/
chmod 777 -R $chrootEnvPath/usr/share/icons
rm -vfr $chrootEnvPath/dev/*
true