firmware_tools/commandline/commandline.gsh
2018-02-18 17:03:14 +00:00

12 lines
287 B
Text

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()
}
}