diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-09-28 12:23:17 +0300 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-09-28 12:23:17 +0300 |
commit | 08aaabafd6a07491bb89324c1306e6e88ae46980 (patch) | |
tree | d3367213b02aa69db2f3fe54d62f283262d3ab86 /scripts/t-rex-64 | |
parent | ffff2512ebbd65773a784565ce78d51d2ceb9a8d (diff) |
find_python.sh by default find any available Python, allow 3.5 too.
t-rex-64 fix case of no $USER when not in tty
Diffstat (limited to 'scripts/t-rex-64')
-rwxr-xr-x | scripts/t-rex-64 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/t-rex-64 b/scripts/t-rex-64 index c18db43f..4e5c0fae 100755 --- a/scripts/t-rex-64 +++ b/scripts/t-rex-64 @@ -1,5 +1,5 @@ #! /bin/bash -if [ $USER != 'root' ]; then +if [ "$(id -u)" != 0 ]; then echo 'Error: Please run as root (sudo etc.)' exit -1 fi @@ -20,7 +20,7 @@ saveterm="$(stty -g)" if cat /proc/cpuinfo | grep -q avx ; then ./_$(basename $0) $INPUT_ARGS RESULT=$? - if [ $? -eq 132 ]; then + if [ $RESULT -eq 132 ]; then echo " WARNING this program is optimized for the new Intel processors. " echo " try the ./t-rex-64-o application that should work for any Intel processor but might be slower. " echo " try to run t-rex-64-o .. " |