Skip to content

Commit 520c28f

Browse files
committed
Improve guards
1 parent ea6e7a6 commit 520c28f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/make/lib/addons/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ FORTRAN_COMPILER ?= gfortran
2525

2626
install-addons: $(NODE_GYP)
2727
$(QUIET) $(MAKE) -f $(this_file) list-pkgs-addons | while read -r pkg; do \
28-
if [[ "$$pkg" != /* ]]; then \
28+
if echo "$$pkg" | grep -v '^\/.*' >/dev/null; then \
2929
continue; \
3030
fi; \
3131
echo ''; \
@@ -48,7 +48,7 @@ install-addons: $(NODE_GYP)
4848

4949
clean-addons:
5050
$(QUIET) $(MAKE) -f $(this_file) list-pkgs-addons | while read -r pkg; do \
51-
if [[ "$$pkg" != /* ]]; then \
51+
if echo "$$pkg" | grep -v '^\/.*' >/dev/null; then \
5252
continue; \
5353
fi; \
5454
echo ''; \

0 commit comments

Comments
 (0)