git-subtree-dir: Common_scripts git-subtree-mainline:49bf4cbda6git-subtree-split:17eae1e135
13 lines
No EOL
298 B
Text
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 |