-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #460 from GATEOverflow/mlperf-inference
Improvements to version-detect in get-generic-sys-util
- Loading branch information
Showing
4 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
#!/bin/bash | ||
|
||
if [[ -n "${CM_SYS_UTIL_VERSION_CMD}" ]]; then | ||
${CM_SYS_UTIL_VERSION_CMD} > tmp-ver.out | ||
if [[ "${CM_SYS_UTIL_VERSION_CMD_USE_ERROR_STREAM}" == "yes" ]]; then | ||
# Redirect both stdout and stderr to tmp-ver.out | ||
cmd="${CM_SYS_UTIL_VERSION_CMD} > tmp-ver.out 2>&1" | ||
else | ||
cmd="${CM_SYS_UTIL_VERSION_CMD} > tmp-ver.out" | ||
fi | ||
echo $cmd | ||
eval $cmd | ||
test $? -eq 0 || exit $? | ||
fi | ||
|
||
test $? -eq 0 || exit $? |