Implemented getATBUpdateToolYoctoVersion() and getATBUpdateToolYoctoInstallationStatus()
This commit is contained in:
parent
731cdcbe09
commit
504e242d42
24
worker.cpp
24
worker.cpp
@ -981,6 +981,30 @@ QString Worker::getOsVersion() const {
|
||||
return "N/A";
|
||||
}
|
||||
|
||||
QString Worker::getATBUpdateToolYoctoVersion() {
|
||||
if (QFile::exists("/var/lib/opkg/status")) {
|
||||
QString const cmd = QString("echo -n $(cat /var/lib/opkg/status | grep -A1 atbupdatetool | tail -n 1 | cut -d':' -f2 | cut -d' ' -f2)");
|
||||
Command c("bash");
|
||||
if (c.execute("/tmp", QStringList() << "-c" << cmd)) {
|
||||
return c.getCommandResult(); // 1.3.9+git0+226553a8ab-r0
|
||||
}
|
||||
}
|
||||
return "N/A";
|
||||
}
|
||||
|
||||
QString Worker::getATBUpdateToolYoctoInstallationStatus() {
|
||||
if (QFile::exists("/var/lib/opkg/status")) {
|
||||
QString const cmd = QString("echo -n $(cat /var/lib/opkg/status | grep -A3 atbupdatetool | tail -n 1 | cut -d':' -f2 | cut -d' ' -f2,3,4)");
|
||||
Command c("bash");
|
||||
if (c.execute("/tmp", QStringList() << "-c" << cmd)) {
|
||||
return c.getCommandResult(); // 1.3.9+git0+226553a8ab-r0
|
||||
}
|
||||
}
|
||||
return "N/A";
|
||||
}
|
||||
|
||||
|
||||
|
||||
QString Worker::getATBQTVersion() const {
|
||||
QString const cmd = QString("echo -n $(/opt/app/ATBAPP/ATBQT -v | head -n 2 | cut -d':' -f2)");
|
||||
Command c("bash");
|
||||
|
Loading…
Reference in New Issue
Block a user