-
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.
Improvements to version detect for get-generic-sys-util
- Loading branch information
1 parent
90a0875
commit 4ea5341
Showing
2 changed files
with
11 additions
and
3 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
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 $? |