mirror of
https://gitee.com/amber-ce/amber-pm
synced 2025-12-17 10:51:36 +08:00
use data dir to avoid errors in DATA_DIRS
This commit is contained in:
@@ -10,7 +10,7 @@ fi
|
|||||||
|
|
||||||
# Desktop files (used by desktop environments within both X11 and Wayland) are
|
# 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
|
# 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
|
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||||
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
|
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ fi
|
|||||||
|
|
||||||
# Desktop files (used by desktop environments within both X11 and Wayland) are
|
# 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
|
# 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
|
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||||
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
|
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ fi
|
|||||||
|
|
||||||
# Desktop files (used by desktop environments within both X11 and Wayland) are
|
# 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
|
# 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
|
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||||
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
|
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -111,6 +111,9 @@ sudo -u $(get_current_user) bwrap --dev-bind $chrootEnvPath/ / \
|
|||||||
locale-gen
|
locale-gen
|
||||||
bookworm-run update-locale LANG=$LANG
|
bookworm-run update-locale LANG=$LANG
|
||||||
chown -R root $chrootEnvPath
|
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
|
chmod 777 -R $chrootEnvPath/usr/share/icons
|
||||||
rm -vfr $chrootEnvPath/dev/*
|
rm -vfr $chrootEnvPath/dev/*
|
||||||
true
|
true
|
||||||
Reference in New Issue
Block a user