Merge pull request #11529 from phire/egrep

lint: replace egrep with grep -E
This commit is contained in:
Pierre Bourdon
2023-02-02 05:33:35 +01:00
committed by GitHub

View File

@ -103,17 +103,17 @@ function java_check() {
# Loop through each modified file. # Loop through each modified file.
for f in ${modified_files}; do for f in ${modified_files}; do
# Filter them. # Filter them.
if echo "${f}" | egrep -q "[.]java$"; then if echo "${f}" | grep -E -q "[.]java$"; then
# Copy Java files to a temporary directory # Copy Java files to a temporary directory
java_setup java_setup
mkdir -p $(dirname "${java_temp_dir}/${f}") mkdir -p $(dirname "${java_temp_dir}/${f}")
cp "${f}" "${java_temp_dir}/${f}" cp "${f}" "${java_temp_dir}/${f}"
continue continue
fi fi
if ! echo "${f}" | egrep -q "[.](cpp|h|mm)$"; then if ! echo "${f}" | grep -E -q "[.](cpp|h|mm)$"; then
continue continue
fi fi
if ! echo "${f}" | egrep -q "^Source"; then if ! echo "${f}" | grep -E -q "^Source"; then
continue continue
fi fi