deep-wine-runner/deb-ace/DEBIAN/postrm

40 lines
1.4 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 使用系统默认的 sh 运行
#################################################################################################################
# 作者gfdgd xi
# 版本2.2.0
# 更新时间2022年09月24日
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
# 基于 sh
#################################################################################################################
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
### 判断 ACE 类型
if [[ `arch` == "loongarch64" ]]; then
# loongarch 架构有多个 ACE优先安装至旧世界的 ACE
if [[ ! -z `which bookworm-run` ]]; then
aceCommand="bookworm-run"
fi
if [[ ! -z `which loongnix-run` ]]; then
aceCommand="loongnix-run"
fi
if [[ $aceCommand == "" ]]; then
echo "Oh no, ssinstall have not installed bookworm-run dependency yet! Exit"
#exit 1
fi
echo "Removing Wine Runner to " $aceCommand
else
###检查aptss在不在
if [ -z `which bookworm-run` ];then
echo "Oh no, ssinstall have not installed bookworm-run dependency yet! Exit"
#exit 1
fi
aceCommand="bookworm-run"
fi
# 卸载应用
$aceCommand apt purge spark-deepin-wine-runner -y | true
else
echo "非卸载,跳过清理"
fi