firmware_tools/commandline/commandline.groovy
Dan Hawkins d2e5ef51ba Debugging
2021-06-30 22:10:09 +01: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