firmware_tools/commandline/commandline.groovy

13 lines
No EOL
298 B
Groovy

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