[PATCH 3 of 4] Download sofware with .sh extension on linux and make it exeutable
Wald Commits
scm-commit at wald.intevation.org
Tue Jul 15 16:37:33 CEST 2014
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1405434655 -7200
# Node ID 4b702f6cf9b6a6d301800ee8f0a093d71b8b383b
# Parent 13cf42dbe9bd7647088fd9470d85a236d47eb774
Download sofware with .sh extension on linux and make it exeutable
diff -r 13cf42dbe9bd -r 4b702f6cf9b6 ui/downloader.cpp
--- a/ui/downloader.cpp Tue Jul 15 16:30:24 2014 +0200
+++ b/ui/downloader.cpp Tue Jul 15 16:30:55 2014 +0200
@@ -231,14 +231,22 @@
QString fileName = dataDirectory.append("/SW-")
.append(remoteModSW.toString("yyyyMMddHHmmss"))
+#ifdef WIN32
.append(".exe");
+#else
+ .append(".sh");
+#endif
qDebug() << "fileName: " << fileName;
if (mDownloadSW) {
if (!downloadFile(mResourceSW, fileName, MAX_SW_SIZE)) {
+ qDebug() << "Failed to download software update.";
return;
}
+ QFile::setPermissions(fileName, QFileDevice::ReadOwner |
+ QFileDevice::WriteOwner |
+ QFileDevice::ExeOwner);
}
emit newSoftwareAvailable(fileName, remoteModSW);
More information about the Trustbridge-commits
mailing list