mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-14 05:51:02 +08:00
* fix: deepin-os can't launch app with desktop file * fix: deepin-os move desktop to clash-verge.desktop --------- Co-authored-by: Yurii.Huang <yurii.huang@dbappsecurity.com.cn>
18 lines
573 B
Bash
18 lines
573 B
Bash
#!/bin/bash
|
|
chmod +x /usr/bin/clash-verge-service-install
|
|
chmod +x /usr/bin/clash-verge-service-uninstall
|
|
chmod +x /usr/bin/clash-verge-service
|
|
|
|
. /etc/os-release
|
|
|
|
if [ "$ID" = "deepin" ]; then
|
|
PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
|
|
DESKTOP_FILES=$(dpkg -L "$PACKAGE_NAME" 2>/dev/null | grep "\.desktop$")
|
|
echo "$DESKTOP_FILES" | while IFS= read -r f; do
|
|
if [ "$(basename "$f")" == "Clash Verge.desktop" ]; then
|
|
echo "Fixing deepin desktop file"
|
|
mv -vf "$f" "/usr/share/applications/clash-verge.desktop"
|
|
fi
|
|
done
|
|
fi
|