summaryrefslogtreecommitdiffstats
path: root/scripts/t-rex-64
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-02-24 04:37:23 -0500
committerYaroslav Brustinov <ybrustin@cisco.com>2016-02-24 04:37:23 -0500
commit146525ddd44618bc5664cd632a86ff14be1c3ba9 (patch)
treee5259054eb25eea725bb1b9596f4638fbba9cc6d /scripts/t-rex-64
parent275a53b9cc7ce4effc5d450861b390ec618a310e (diff)
support bizarre replaced minuses from copy-paste from outlook etc.
Diffstat (limited to 'scripts/t-rex-64')
-rwxr-xr-xscripts/t-rex-6410
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/t-rex-64 b/scripts/t-rex-64
index 1cf82489..0516d7da 100755
--- a/scripts/t-rex-64
+++ b/scripts/t-rex-64
@@ -4,7 +4,9 @@ if [ $USER != 'root' ]; then
exit -1
fi
-./trex-cfg $@
+INPUT_ARGS=${@//[–—]/-} # replace bizarre minuses with normal one
+
+./trex-cfg $INPUT_ARGS
RESULT=$?
if [ $RESULT -ne 0 ]; then
exit $RESULT
@@ -16,15 +18,15 @@ export LD_LIBRARY_PATH=$PWD
saveterm="$(stty -g)"
# if we have a new core run optimized trex
if cat /proc/cpuinfo | grep -q avx ; then
- ./_$(basename $0) $@
+ ./_$(basename $0) $INPUT_ARGS
if [ $? -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 .. "
- ./_t-rex-64-o $@
+ ./_t-rex-64-o $INPUT_ARGS
fi
else
- ./_t-rex-64-o $@
+ ./_t-rex-64-o $INPUT_ARGS
fi
stty $saveterm