firmware_tools/commandline/commandline.groovy
Dan Hawkins c1344e9084 Squashed 'Commons_scripts/' content from commit 0326879
git-subtree-dir: Commons_scripts
git-subtree-split: 0326879391
2022-02-13 17:04:54 +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