firmware_tools/commandline/commandline.gsh

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