iscsi-scst/Makefile, Ubuntu: Simplify code for version querying

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7235 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2017-09-25 23:35:49 +00:00
parent 63f352fc06
commit e7ccfcf213

View File

@@ -70,8 +70,7 @@ ifeq ($(OFED_FLAVOR),MOFED)
else \
echo false; \
fi),true)
OFED_VERS=$(shell dpkg -s mlnx-ofed-kernel-dkms | \
awk -F\- '/Version/ {print $$1}' | awk '{print $$2}')
OFED_VERS=$(shell dpkg-query -W --showformat='${Version}\n' mlnx-ofed-kernel-dkms)
else
ifeq ($(shell if { rpm -q mlnx-ofa_kernel-devel || \
rpm -q kernel-ib-devel; } >&/dev/null; then \