mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-05-19 07:39:50 +08:00
unsintaller support
This commit is contained in:
parent
832b53dfc9
commit
b114db583b
@ -562,7 +562,7 @@ void AppIntoPage::on_pushButton_3_clicked()
|
||||
ui->pushButton_3->setEnabled(false);
|
||||
|
||||
QProcess uninstall;
|
||||
uninstall.start("pkexec", QStringList() << "apt" << "autopurge" << "-y" << info["Pkgname"].toString().toLower());
|
||||
uninstall.start("pkexec", QStringList() << "/opt/durapps/spark-store/bin/store-helper/uninstaller" << info["Pkgname"].toString().toLower());
|
||||
uninstall.waitForFinished(-1);
|
||||
uninstall.close();
|
||||
|
||||
|
14
tool/store-helper/uninstaller
Executable file
14
tool/store-helper/uninstaller
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
dpkg -l | grep "^ii $1 " > /dev/null
|
||||
RET="$?"
|
||||
if [[ "$RET" == "0" ]] ;then
|
||||
apt autopurge $1 -y
|
||||
else
|
||||
|
||||
if command -v bookworm-run > /dev/null;then
|
||||
echo "Try ACE Bookworm"
|
||||
bookworm-run apt autopurge $1 -y
|
||||
|
||||
fi
|
||||
fi
|
||||
exit "$RET"
|
Loading…
x
Reference in New Issue
Block a user