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

Fixed some shfmt/shellcheck errors

parent 6b17c23b
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ if which ack &>/dev/null; then ...@@ -10,7 +10,7 @@ if which ack &>/dev/null; then
__SEARCH_COMMAND__="ack --passthru" __SEARCH_COMMAND__="ack --passthru"
else else
echo "ack is not installed; defaulting to grep, but note that the log will be missing the IOC log" >&2 echo "ack is not installed; defaulting to grep, but note that the log will be missing the IOC log" >&2
__SEARCH_COMMAND__=grep __SEARCH_COMMAND__="grep"
fi fi
function usage { function usage {
...@@ -28,11 +28,11 @@ function show_header { ...@@ -28,11 +28,11 @@ function show_header {
} }
function install_vers { function install_vers {
for ver in $@; do for ver in "$@"; do
echo "==========================================" echo "=========================================="
echo "Installing local version version '$ver'" echo "Installing local version version '$ver'"
echo "==========================================" echo "=========================================="
make -C test clean cellinstall __DEBUG_VERSION=$ver __EPICS_BASE_LOCATION="$EPICS_BASE" __REQUIRE_VERSION="$REQUIRE_VER" E3_NO_TEST=true make -C test clean cellinstall __DEBUG_VERSION="$ver" __EPICS_BASE_LOCATION="$EPICS_BASE" __REQUIRE_VERSION="$REQUIRE_VER" E3_NO_TEST=true
done done
} }
...@@ -65,8 +65,8 @@ function test_require { ...@@ -65,8 +65,8 @@ function test_require {
echo "Installed: $args" echo "Installed: $args"
echo "============================================================" echo "============================================================"
required=$(sed 's/+/\\+/g' <<<$required) required=${required//+/\\+}
expected=$(sed 's/+/\\+/g' <<<$expected) expected=${expected//+/\\+}
clean_vers clean_vers
...@@ -90,7 +90,7 @@ function test_require { ...@@ -90,7 +90,7 @@ function test_require {
# we are looking for. If we simply cut it out then we seem to be able to more consistently # we are looking for. If we simply cut it out then we seem to be able to more consistently
# get meaningful tests. # get meaningful tests.
echo exit | eval iocsh.bash "$iocsh_args" | echo exit | eval iocsh.bash "$iocsh_args" |
sed -e '1h;2,$H;$!d;g' -e 's/Starting iocInit\niocRun: All initialization complete\n//' | sed -e '1 h; 2,$ H; $! d; g' -e 's/Starting iocInit\niocRun: All initialization complete\n//' |
$__SEARCH_COMMAND__ "${search_string}" $__SEARCH_COMMAND__ "${search_string}"
} }
...@@ -109,7 +109,7 @@ function format_output { ...@@ -109,7 +109,7 @@ function format_output {
result_str="\033[31mfailed\033[0m" result_str="\033[31mfailed\033[0m"
fi fi
printf "Test: $result_str\n" printf "Test: %s\n" "$result_str"
printf "requested: %-20s expected: %-20s\n" "$requested" "$expected" printf "requested: %-20s expected: %-20s\n" "$requested" "$expected"
printf "Given versions: %s\n" "$versions" printf "Given versions: %s\n" "$versions"
printf "============================================================\n" printf "============================================================\n"
...@@ -150,6 +150,7 @@ if [ ! -f "$ENV_SRC" ]; then ...@@ -150,6 +150,7 @@ if [ ! -f "$ENV_SRC" ]; then
echo "setE3Env.bash not found at location $ENV_SRC" >&2 echo "setE3Env.bash not found at location $ENV_SRC" >&2
exit 1 exit 1
fi fi
# shellcheck disable=SC1090
source "$ENV_SRC" &>/dev/null source "$ENV_SRC" &>/dev/null
show_header show_header
......
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