mirror of
https://gitee.com/amber-ce/amber-pm
synced 2026-03-25 23:19:49 +08:00
1.0.8 修复GXDE上无法选择
This commit is contained in:
@@ -3,7 +3,7 @@ Source: amber-ce
|
|||||||
Version: 1.0.8
|
Version: 1.0.8
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Maintainer: shenmo <shenmo@spark-app.store>
|
Maintainer: shenmo <shenmo@spark-app.store>
|
||||||
Installed-Size: 48712
|
Installed-Size: 48716
|
||||||
Depends: bubblewrap, flatpak, policykit-1 | pkexec | polkit-1 | polkit, systemd, procps,coreutils,fuse-overlayfs,xz-utils
|
Depends: bubblewrap, flatpak, policykit-1 | pkexec | polkit-1 | polkit, systemd, procps,coreutils,fuse-overlayfs,xz-utils
|
||||||
Section: misc
|
Section: misc
|
||||||
Conflicts: ace-host-integration
|
Conflicts: ace-host-integration
|
||||||
|
|||||||
30
src/usr/bin/amber-pm-gxde-desktop-fix
Executable file
30
src/usr/bin/amber-pm-gxde-desktop-fix
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ ! -e "/usr/share/gxde-api" ]];then
|
||||||
|
exit 0 # No needed
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 函数:检查目录并创建符号链接
|
||||||
|
process_directory() {
|
||||||
|
local source_dir="$1"
|
||||||
|
local target_dir="$2"
|
||||||
|
local name="$3"
|
||||||
|
|
||||||
|
if [ -d "$source_dir" ] && [ -n "$(ls -A "$source_dir")" ]; then
|
||||||
|
ln -sv $source_dir/* "$target_dir" 2>/dev/null
|
||||||
|
find "$target_dir" -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
|
||||||
|
else
|
||||||
|
echo "$name directory is empty or does not exist, skipping..."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 处理 applications 目录
|
||||||
|
process_directory "/var/lib/apm/apm/files/ace-env/amber-ce-tools/data-dir/applications/" \
|
||||||
|
"/usr/local/share/applications/" "Applications"
|
||||||
|
|
||||||
|
# 处理 icons 目录
|
||||||
|
process_directory "/var/lib/apm/apm/files/ace-env/amber-ce-tools/data-dir/icons/" \
|
||||||
|
"/usr/local/share/icons/" "Icons"
|
||||||
|
|
||||||
|
# 等待所有后台任务完成
|
||||||
|
wait
|
||||||
@@ -120,6 +120,7 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
amber-pm-debug amber-pm-dstore-patch
|
amber-pm-debug amber-pm-dstore-patch
|
||||||
apm-nvidia-toggle
|
apm-nvidia-toggle
|
||||||
|
amber-pm-gxde-desktop-fix
|
||||||
;;
|
;;
|
||||||
download|search|policy|list|update|clean)
|
download|search|policy|list|update|clean)
|
||||||
command=$1
|
command=$1
|
||||||
@@ -147,6 +148,7 @@ case "$1" in
|
|||||||
exit $exit_code
|
exit $exit_code
|
||||||
fi
|
fi
|
||||||
amber-pm-debug amber-pm-dstore-patch
|
amber-pm-debug amber-pm-dstore-patch
|
||||||
|
amber-pm-gxde-desktop-fix
|
||||||
;;
|
;;
|
||||||
run)
|
run)
|
||||||
# 运行包命令:第二个参数必须是包名
|
# 运行包命令:第二个参数必须是包名
|
||||||
|
|||||||
Reference in New Issue
Block a user