firmware_tools/commandline/commandline.gsh
2018-10-15 15:54:16 +01:00

13 lines
No EOL
298 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()
}
}
return this