-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added some extra information logging in the build and build_all scripts.
Changed the format of a log message in the JPC codec. Added -I and -X options to the run_codec_test script in order to allow explicit inclusion and exclusion of tests. Disabled the sgn_1 test in the run_test_3 script on Windows. Added a new script called sysinfo for obtaining platform-specific information.
- Loading branch information
Showing
6 changed files
with
152 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#! /usr/bin/env bash | ||
|
||
panic() | ||
{ | ||
echo "ERROR: $@" 1>&2 | ||
exit 1 | ||
} | ||
|
||
eecho() | ||
{ | ||
echo "$@" 1>&2 | ||
} | ||
|
||
all_keys=(os kernel release) | ||
verbose=0 | ||
keys=() | ||
|
||
while getopts avork option; do | ||
case "$option" in | ||
a) | ||
keys=("${all_keys[@]}");; | ||
v) | ||
verbose=$((verbose + 1));; | ||
o) | ||
keys+=(os);; | ||
k) | ||
keys+=(kernel);; | ||
r) | ||
keys+=(release);; | ||
\?) | ||
panic "invalid option $option" | ||
break;; | ||
esac | ||
done | ||
shift $((OPTIND - 1)) | ||
|
||
if [ "${#keys[@]}" -eq 0 ]; then | ||
exit 0 | ||
fi | ||
|
||
release="$(uname -r)" || panic | ||
kernel="$(uname)" || panic | ||
|
||
if [ "$verbose" -ge 1 ]; then | ||
eecho "uname $name" | ||
eecho "uname -r $release" | ||
fi | ||
|
||
os= | ||
|
||
case "$release" in | ||
*[Mm]icrosoft*) | ||
os=windows;; | ||
esac | ||
|
||
if [ -z "$os" ]; then | ||
case "$kernel" in | ||
*[Ll]inux*) | ||
os=linux;; | ||
esac | ||
fi | ||
|
||
if [ -z "$os" ]; then | ||
os=unknown | ||
fi | ||
|
||
for key in "${keys[@]}"; do | ||
case "$key" in | ||
os) | ||
value="$os";; | ||
kernel) | ||
value="$kernel";; | ||
release) | ||
value="$release";; | ||
*) | ||
panic;; | ||
esac | ||
echo "$value" || panic | ||
done |
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