forked from qt-creator/qt-creator
Utils: replace windows line breaks with unix breaks in deviceshell.sh
Change-Id: I6e07497370360ff04dfec66b55c2e69c0215d235 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -259,8 +259,11 @@ bool DeviceShell::installShellScript()
|
||||
return false;
|
||||
}
|
||||
|
||||
const static QByteArray shellScriptBase64
|
||||
= FilePath(":/utils/scripts/deviceshell.sh").fileContents().value().toBase64();
|
||||
const static QByteArray shellScriptBase64 = FilePath(":/utils/scripts/deviceshell.sh")
|
||||
.fileContents()
|
||||
.value()
|
||||
.replace("\r\n", "\n")
|
||||
.toBase64();
|
||||
const QByteArray scriptCmd = "(scriptData=$(echo " + shellScriptBase64
|
||||
+ " | base64 -d 2>/dev/null ) && /bin/sh -c \"$scriptData\") || "
|
||||
"echo ERROR_INSTALL_SCRIPT >&2\n";
|
||||
|
Reference in New Issue
Block a user