scripts: replace egrep with grep -E
Calling egrep is non-standard and deprecated. Use grep -E instead. Change-Id: Ie5ce5faa641550c4fb08bb32796a46f2aeb76c61 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460516 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
cf090c6cb9
commit
772eb8ebbb
@ -42,7 +42,7 @@ if [ -s /etc/redhat-release ]; then
|
||||
|
||||
# Includes Fedora, CentOS 7, RHEL 7
|
||||
# Add EPEL repository for CUnit-devel and libunwind-devel
|
||||
if echo "$ID $VERSION_ID" | egrep -q 'rhel 7|centos 7'; then
|
||||
if echo "$ID $VERSION_ID" | grep -E -q 'rhel 7|centos 7'; then
|
||||
if ! rpm --quiet -q epel-release; then
|
||||
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||
fi
|
||||
@ -68,7 +68,7 @@ if [ -s /etc/redhat-release ]; then
|
||||
# Additional dependencies for building pmem based backends
|
||||
yum install -y libpmemblk-devel || true
|
||||
# Additional dependencies for SPDK CLI - not available in rhel and centos
|
||||
if ! echo "$ID $VERSION_ID" | egrep -q 'rhel 7|centos 7'; then
|
||||
if ! echo "$ID $VERSION_ID" | grep -E -q 'rhel 7|centos 7'; then
|
||||
yum install -y python3-configshell python3-pexpect
|
||||
fi
|
||||
# Additional dependencies for ISA-L used in compression
|
||||
|
@ -298,7 +298,7 @@ function cleanup_linux {
|
||||
done
|
||||
shopt -u extglob nullglob
|
||||
|
||||
files_to_clean+="$(ls -1 /dev/shm/* | egrep '(spdk_tgt|iscsi|vhost|nvmf|rocksdb|bdevio|bdevperf)_trace|spdk_iscsi_conns' || true) "
|
||||
files_to_clean+="$(ls -1 /dev/shm/* | grep -E '(spdk_tgt|iscsi|vhost|nvmf|rocksdb|bdevio|bdevperf)_trace|spdk_iscsi_conns' || true) "
|
||||
files_to_clean="$(readlink -e assert_not_empty $files_to_clean || true)"
|
||||
if [[ -z "$files_to_clean" ]]; then
|
||||
echo "Clean"
|
||||
@ -318,7 +318,7 @@ function cleanup_linux {
|
||||
|
||||
echo 'Cleaning'
|
||||
for f in $files_to_clean; do
|
||||
if ! echo "$opened_files" | egrep -q "^$f\$"; then
|
||||
if ! echo "$opened_files" | grep -E -q "^$f\$"; then
|
||||
echo "Removing: $f"
|
||||
rm $f
|
||||
else
|
||||
@ -327,7 +327,7 @@ function cleanup_linux {
|
||||
done
|
||||
|
||||
for dir in $dirs_to_clean; do
|
||||
if ! echo "$opened_files" | egrep -q "^$dir\$"; then
|
||||
if ! echo "$opened_files" | grep -E -q "^$dir\$"; then
|
||||
echo "Removing: $dir"
|
||||
rmdir $dir
|
||||
else
|
||||
|
@ -116,7 +116,7 @@ if [ "$(uname -s)" = "Linux" ]; then
|
||||
export HUGEMEM=8192
|
||||
elif [ "$(uname -s)" = "FreeBSD" ]; then
|
||||
MAKE=gmake
|
||||
MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | egrep -i 'hw.ncpu' | awk '{print $2}')}
|
||||
MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | grep -E -i 'hw.ncpu' | awk '{print $2}')}
|
||||
DPDK_FREEBSD_DIR=/usr/local/share/dpdk/x86_64-native-bsdapp-clang
|
||||
if [ -d $DPDK_FREEBSD_DIR ] && [ $SPDK_RUN_INSTALLED_DPDK -eq 1 ]; then
|
||||
WITH_DPDK_DIR=$DPDK_FREEBSD_DIR
|
||||
|
@ -42,12 +42,12 @@ function waitfortcp() {
|
||||
fi
|
||||
|
||||
if $have_ss_cmd; then
|
||||
if $ns_cmd ss -ln | egrep -q "\s+$addr\s+"; then
|
||||
if $ns_cmd ss -ln | grep -E -q "\s+$addr\s+"; then
|
||||
break
|
||||
fi
|
||||
elif [[ "$(uname -s)" == "Linux" ]]; then
|
||||
# For Linux, if system doesn't have ss, just assume it has netstat
|
||||
if $ns_cmd netstat -an | grep -iw LISTENING | egrep -q "\s+$addr\$"; then
|
||||
if $ns_cmd netstat -an | grep -iw LISTENING | grep -E -q "\s+$addr\$"; then
|
||||
break
|
||||
fi
|
||||
fi
|
||||
|
@ -82,7 +82,7 @@ function tgt_check_notifications() {
|
||||
echo "ERROR: got extra event: $event_line"
|
||||
rc=false
|
||||
continue
|
||||
elif ! echo "$ev_type" | egrep -q "^${ex_ev_type}\$" || ! echo "$ev_ctx" | egrep -q "^${ex_ev_ctx}\$"; then
|
||||
elif ! echo "$ev_type" | grep -E -q "^${ex_ev_type}\$" || ! echo "$ev_ctx" | grep -E -q "^${ex_ev_ctx}\$"; then
|
||||
echo "ERROR: expected event '$1' but got '$event' (whole event line: $event_line)"
|
||||
rc=false
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user