diff --git a/Makefile b/Makefile index f200173e726a2f6a7c706192f1173bd1979a67c0..e8cf00d4e4e3906982233eff845227a2602a6dd0 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ SOURCES:=java/org/slub/rosetta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin. OBJS:=$(SOURCES:.java=.class) JAR:=SLUBVirusCheckPlugin.jar BUILD:=build/ +SHELL=/bin/bash all: $(BUILD) $(JAR) @@ -75,20 +76,12 @@ check_prerequisites: test_eicar: $(OBJS) @/usr/bin/java -cp $(CLASSPATH):$(JUNITCLASSPATH):java org.slub.rosetta.dps.repository.plugin.SLUBVirusCheckClamAVPlugin EICAR/eicar | grep -F 'SIGNATURE:' > $@ @echo -n "testing 'EICAR':" -ifeq "$(shell cat test_eicar)" "RESULT: 2 SIGNATURE: Eicar-Signature" - @echo pass; -else - @echo failed; exit 2; -endif + @if [[ "$$(cat test_eicar)" = "RESULT: 2 SIGNATURE: Eicar-Signature" ]]; then echo pass; else echo failed; exit 2;fi test_novirus: $(OBJS) @/usr/bin/java -cp $(CLASSPATH):$(JUNITCLASSPATH):java org.slub.rosetta.dps.repository.plugin.SLUBVirusCheckClamAVPlugin Makefile | grep -F 'SIGNATURE:' > $@ @echo -n "testing 'No virus': " -ifeq "$(shell cat test_novirus)" "RESULT: 0 SIGNATURE: " - @echo pass; -else - @echo fail; exit 2; -endif + @if [[ "$$(cat test_novirus)" = "RESULT: 0 SIGNATURE: " ]]; then echo pass; else echo fail; exit 2; fi test: test_eicar test_novirus