From 2f14d083ee9f47609537365d8c98e7d6bd04e59b Mon Sep 17 00:00:00 2001 From: Mossimo Date: Fri, 17 Nov 2023 13:43:47 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E5=8D=B8?= =?UTF-8?q?=E8=BD=BD=E8=84=9A=E6=9C=AC=20rfq=20->=20rf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/linux/uninstall.sh | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/build/linux/uninstall.sh b/build/linux/uninstall.sh index 1671fe37b42..7f031198895 100644 --- a/build/linux/uninstall.sh +++ b/build/linux/uninstall.sh @@ -42,19 +42,28 @@ Kill_Process() { } Kill_Process -zenity --question --text="是否删除用户数据" --width=400 +zenity --question --text="是否删除证书?" --width=400 # 获取上一个命令的退出码 -response=$? +delCer=$? -if [ $response -eq 0 ]; then - rm -rfq "$AppData" 2>/dev/null - rm -rfq "$AppData_t" 2>/dev/null +if [ $delCer -eq 0 ]; then + certutil -D -d $HOME/.pki/nssdb -n "SteamTools" +fi + +zenity --question --text="是否删除用户数据?" --width=400 +# 获取上一个命令的退出码 +delUserData=$? + +if [ $delUserData -eq 0 ]; then + rm -rf $AppData 2>/dev/null + rm -rf $AppData_t 2>/dev/null + certutil -D -d $HOME/.pki/nssdb -n "SteamTools" else echo "保留用户数据方便下次安装。" echo "如需删除可手动删除该目录:$AppData 或者 $AppData_t" fi -rm -rfq "$Cache" 2>/dev/null -rm -rfq "$Cache_t" 2>/dev/null -rm -rfq "$base_path" 2>/dev/null -rm -rfq "$HOME/Desktop/Watt Toolkit.desktop" 2>/dev/null +rm -rf $Cache 2>/dev/null +rm -rf $Cache_t 2>/dev/null +rm -rf $base_path 2>/dev/null +rm -rf "$HOME/Desktop/Watt Toolkit.desktop" 2>/dev/null zenity --info --text="卸载完成!" --width=300