Преглед на файлове

build: Case-insensitive check for GRASS in prefix (#949)

A check for the word grass in the installation directory (prefix) was lowercase only. This was too exclusive and caused a warning and unnecessary interaction for cases where GRASS is written in uppercase which is the case, e.g., on macOS with /Applications/GRASS-7.9.app/...

This checks against a lower-cased install directory path, hence making it case-insensitive.
nilason преди 4 години
родител
ревизия
5e976f7f8d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      include/Make/Install.make

+ 1 - 1
include/Make/Install.make

@@ -71,7 +71,7 @@ install-check-writable:
 	fi
 
 install-check-prefix:
-	@ result=`echo "$(INST_DIR)" | awk '{ if ($$1 ~ /grass/) print $$1 }'`; \
+	@ result=`echo "$(INST_DIR)" | awk '{ if (tolower($$1) ~ /grass/) print $$1 }'`; \
 	if [ "$$result" = "" ] ; then \
 		echo "WARNING: Your install directory $(INST_DIR)" >&2 ; \
 		echo "  does not contain the word 'grass'." >&2 ; \