Skip to content
Snippets Groups Projects
Commit 6e5ea127 authored by Simon Rose's avatar Simon Rose
Browse files

use grep -E

parent d7b9b623
No related branches found
No related tags found
No related merge requests found
......@@ -7,14 +7,12 @@ EPICS_BASE=${EPICS_BASE:-/epics/base-7.0.5}
REQUIRE_VER=${E3_REQUIRE_VERSION:-3.4.1}
if which ack &>/dev/null; then
__use_ack=true
__SEARCH_COMMAND__="ack --passthru"
else
echo "ack is not installed; defaulting to grep, but note that the log will be missing the IOC log" >&2
__use_ack=false
__SEARCH_COMMAND__="grep -E"
fi
#__use_ack=false
function usage {
echo "Usage:"
echo " bash test.sh [-b <EPICS_BASE>] [-r <REQUIRE_VER>] [-h] testfile"
......@@ -67,13 +65,8 @@ function test_require {
echo "Installed: ${args[*]}"
echo "============================================================"
if [ "$__use_ack" = true ]; then
required=${required//+/\\+}
expected=${expected//+/\\+}
__SEARCH_COMMAND__="ack --passthru"
else
__SEARCH_COMMAND__="grep"
fi
required=${required//+/\\+}
expected=${expected//+/\\+}
clean_vers
......@@ -91,8 +84,6 @@ function test_require {
search_string="^Loaded $MODULENAME version $expected\$"
fi
echo "SEARCH STRING: $search_string"
# The funny sed command here is from https://unix.stackexchange.com/a/235016/445931
# The reason this is needed is because the "Starting iocInit" message seems to be threaded
# differently than the regular flow of output and sometimes will separate the strings that
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment