mirror of
https://gitee.com/amber-ce/amber-ce-bookworm.git
synced 2025-12-14 02:52:04 +08:00
fix:no-icon-uos
This commit is contained in:
@@ -4,5 +4,5 @@ Section: misc
|
|||||||
Priority: optional
|
Priority: optional
|
||||||
Depends: bubblewrap,flatpak,zenity
|
Depends: bubblewrap,flatpak,zenity
|
||||||
Maintainer: shenmo <shenmo@spark-app.store>
|
Maintainer: shenmo <shenmo@spark-app.store>
|
||||||
Architecture: amd64
|
Architecture: arm64
|
||||||
Description: bwrap wrapper for install and running debs inside a bookworm container
|
Description: bwrap wrapper for install and running debs inside a bookworm container
|
||||||
|
|||||||
@@ -1,5 +1,29 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
ACE_dir="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env"
|
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(){
|
function do_integrate(){
|
||||||
local file=$1
|
local file=$1
|
||||||
if [ -f "$file" ]; then
|
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
|
for file in /opt/apps/$app_dir/entries/applications/*.desktop;do
|
||||||
do_integrate $file
|
do_integrate $file
|
||||||
DESKTOP_FILE_NAME=$(basename $file)
|
DESKTOP_FILE_NAME=$(basename $file)
|
||||||
pushd /usr/share/applications
|
ln -sf "../../../opt/apps/$app_dir/entries/applications/$DESKTOP_FILE_NAME" "/usr/share/applications/"
|
||||||
ln -sf "../../../opt/apps/$app_dir/entries/applications/$DESKTOP_FILE_NAME" "./"
|
linkDir "../../../opt/apps/$app_dir/entries/icons" "/usr/share/icons/"
|
||||||
|
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user