From 3bf7cec7326e6c12c6e4ac2424a1b78817c21408 Mon Sep 17 00:00:00 2001 From: chriswang521 Date: Thu, 25 May 2023 17:09:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8D=B8=E8=BD=BD=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=8F=92=E4=BB=B6=E5=92=8C=E8=BD=AF=E4=BB=B6=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=95=B0=E6=8D=AE:=201.deb=E5=8C=85,=E5=8F=AA?= =?UTF-8?q?=E6=9C=89=E5=BD=93=E6=89=A7=E8=A1=8Cdpkg=20--purge=E6=88=96?= =?UTF-8?q?=E8=80=85-P=E6=97=B6,=E4=BC=9A=E5=88=A0=E9=99=A4=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E7=94=A8=E6=88=B7=E9=BB=98=E8=AE=A4=E7=9A=84=E8=BD=AF?= =?UTF-8?q?=E4=BB=B6=E7=94=A8=E6=88=B7=E6=95=B0=E6=8D=AE.=202.rpm=E5=8C=85?= =?UTF-8?q?,rpm=20-e=E5=B0=B1=E4=BC=9A=E5=88=A0=E9=99=A4=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=BB=98=E8=AE=A4=E7=9A=84=E8=BD=AF=E4=BB=B6?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=95=B0=E6=8D=AE.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/linux/debian/postrm.template | 7 +++++++ resources/linux/rpm/code.spec.template | 2 ++ 2 files changed, 9 insertions(+) diff --git a/resources/linux/debian/postrm.template b/resources/linux/debian/postrm.template index 238a566c..c03fb131 100755 --- a/resources/linux/debian/postrm.template +++ b/resources/linux/debian/postrm.template @@ -9,3 +9,10 @@ rm -f /usr/bin/@@NAME@@ if hash update-mime-database 2>/dev/null; then update-mime-database /usr/share/mime fi + +case "$1" in + purge|P) + rm -rf /home/${SUDO_USER}/.config/Code\ -\ OSS + rm -rf /home/${SUDO_USER}/.vscode-oss + ;; +esac diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template index c9e9a3c3..4132bdb1 100644 --- a/resources/linux/rpm/code.spec.template +++ b/resources/linux/rpm/code.spec.template @@ -58,6 +58,8 @@ update-mime-database /usr/share/mime &> /dev/null || : %postun if [ $1 = 0 ]; then rm -f /usr/bin/@@NAME@@ + rm -rf /home/${SUDO_USER}/.config/Code\ -\ OSS + rm -rf /home/${SUDO_USER}/.vscode-oss fi # Update mimetype database for removed workspace mimetype