From 887c52fca74c8c8748c5cf109e24db650d855b03 Mon Sep 17 00:00:00 2001 From: Waleed Khan <me@waleedkhan.name> Date: Fri, 25 Sep 2015 19:09:34 -0400 Subject: [PATCH] Silence dos2unix errors The result is that if it 1) doesn't exist, or 2) exits with error, we don't quit making the submit file. This includes weird cases such as permission being denied on certain directories. It's really hard to imagine dos2unix legitimately failing, and even if it does, the autograder should be already changing CRLF to LFs in its test case normalization process. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 26104d6..e392490 100644 --- a/Makefile +++ b/Makefile @@ -132,7 +132,7 @@ clean: PARTIAL_SUBMITFILES=$(filter-out $(TESTSOURCES), $(wildcard Makefile *.h *.cpp)) $(PARTIAL_SUBMITFILE): $(PARTIAL_SUBMITFILES) rm -f $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE) - dos2unix $(PARTIAL_SUBMITFILES) + -dos2unix $(PARTIAL_SUBMITFILES) tar -vczf $(PARTIAL_SUBMITFILE) $(PARTIAL_SUBMITFILES) @echo !!! WARNING: No test cases included. Use 'make fullsubmit' to include test cases. !!! @@ -140,7 +140,7 @@ $(PARTIAL_SUBMITFILE): $(PARTIAL_SUBMITFILES) FULL_SUBMITFILES=$(filter-out $(TESTSOURCES), $(wildcard Makefile *.h *.cpp test*.txt)) $(FULL_SUBMITFILE): $(FULL_SUBMITFILES) rm -f $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE) - dos2unix $(FULL_SUBMITFILES) + -dos2unix $(FULL_SUBMITFILES) tar -vczf $(FULL_SUBMITFILE) $(FULL_SUBMITFILES) @echo !!! Final submission prepared, test cases included... READY FOR GRADING !!! @@ -215,4 +215,4 @@ project0.o: project0.cpp class.h # these targets do not create any files .PHONY: all release debug profile clean alltests partialsubmit fullsubmit help # disable built-in rules -.SUFFIXES: \ No newline at end of file +.SUFFIXES: -- GitLab