fix:no-icon-uos

This commit is contained in:
2023-11-12 17:58:18 +08:00
parent 259957fb9e
commit 79679e79dc
2 changed files with 28 additions and 3 deletions

View File

@@ -4,5 +4,5 @@ Section: misc
Priority: optional
Depends: bubblewrap,flatpak,zenity
Maintainer: shenmo <shenmo@spark-app.store>
Architecture: amd64
Architecture: arm64
Description: bwrap wrapper for install and running debs inside a bookworm container

View File

@@ -1,5 +1,29 @@
#!/bin/bash
ACE_dir="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env"
function linkDir() {
ensureTargetDir() {
targetFile=$1
t=$(dirname "$targetFile")
mkdir -p "$t"
}
source=$1
target=$2
sourceDir=$(dirname "$source")
targetDir=$(dirname "$target")
find "$source" -type f | while read sourceFile; do
targetFile="$targetDir/${sourceFile#$sourceDir/}"
if [ -L "$targetFile" ] && [ "$(readlink "$targetFile")" = "$sourceFile" ]; then
continue
else
rm -f "$targetFile"
fi
ensureTargetDir "$targetFile"
ln -s "$sourceFile" "$targetFile"
done
}
function do_integrate(){
local file=$1
if [ -f "$file" ]; then
@@ -28,8 +52,9 @@ for app_dir in $(ls /opt/apps/); do
for file in /opt/apps/$app_dir/entries/applications/*.desktop;do
do_integrate $file
DESKTOP_FILE_NAME=$(basename $file)
pushd /usr/share/applications
ln -sf "../../../opt/apps/$app_dir/entries/applications/$DESKTOP_FILE_NAME" "./"
ln -sf "../../../opt/apps/$app_dir/entries/applications/$DESKTOP_FILE_NAME" "/usr/share/applications/"
linkDir "../../../opt/apps/$app_dir/entries/icons" "/usr/share/icons/"
done
done