mirror of
https://gitee.com/spark-store-project/spark-wine
synced 2026-05-14 02:00:18 +08:00
update spark-dwine-launch/postrm_template.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
This commit is contained in:
@@ -3,6 +3,49 @@ if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
|
||||
|
||||
echo "清理卸载残留"
|
||||
CONTAINER_NAME=""
|
||||
PACK_NAME=""
|
||||
MIME_TYPE=""
|
||||
ACTIVEX_NAME=""
|
||||
MAKE_AUTOSTART=""
|
||||
SEND_TO_DESKTOP=""
|
||||
|
||||
make_autostart()
|
||||
{
|
||||
for file in $(ls /home)
|
||||
do
|
||||
if [ -d "/home/$file/.config/autostart" ]
|
||||
then
|
||||
rm /home/$file/.config/autostart/${PACK_NAME}.desktop
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
send_to_desktop()
|
||||
{
|
||||
for file in $(ls /home)
|
||||
do
|
||||
if [ -d "/home/$file/.config/autostart" ]
|
||||
then
|
||||
desktop=$(cat /etc/xdg/user-dirs.defaults | grep DESKTOP | awk -F= '{print $2}')
|
||||
if [ -d "/home/$file/$desktop" ]; then
|
||||
rm /home/$file/$desktop/${PACK_NAME}*.desktop
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
if [ -n "$MAKE_AUTOSTART" ]; then
|
||||
make_autostart
|
||||
fi
|
||||
|
||||
if [ -n "$SEND_TO_DESKTOP" ]; then
|
||||
send_to_desktop
|
||||
fi
|
||||
|
||||
if [ -n "$ACTIVEX_NAME" ]; then
|
||||
rm /usr/lib/mozilla/plugins/libpipelight-${ACTIVEX_NAME}.so
|
||||
fi
|
||||
|
||||
|
||||
if [ -z $CONTAINER_NAME ];then
|
||||
echo "W: 没有指定容器,跳过清理容器。请手动前往 ~/.deepinwine/ 下删除"
|
||||
|
||||
Reference in New Issue
Block a user