firmware_tools/Common_scripts/commandline/commandline.groovy
2022-02-13 19:44:32 +00:00

12 lines
No EOL
283 B
Groovy

String getCommandOutput(String cmd) {
if (isUnix()) {
return sh(returnStdout: true, script: '#!/bin/sh -e\n' + cmd).trim()
} else {
return powershell(returnStdout: true, script: """
${cmd}
"""
).trim()
}
}
return this