psychoinformatics-de / paper-remodnav

Code, data and manuscript for https://doi.org/10.1101/619254
Creative Commons Attribution 4.0 International
4 stars 2 forks source link

`img/Makefile ignore-%` not reproducible on Windows (inside Docker) #26

Closed mih closed 11 months ago

mih commented 11 months ago

It simply fails to detect the matching existing records (with grep) and adds new ones that get windows line endings when committed.

mih commented 11 months ago

Here is a patch

diff --git a/img/Makefile b/img/Makefile
index 3dc7e9c..31ce6c1 100644
--- a/img/Makefile
+++ b/img/Makefile
@@ -13,7 +13,7 @@ clean:
 # git-ignore each auto-rendered figure
 .PHONY: ignore-%
 ignore-%:
-       @grep -q "^$*$$" .gitignore || { \
+       @tr -d '\r' < .gitignore | grep -q "^$*$$" || { \
          echo "$*" >> .gitignore; echo "Ignore $@"; }

 #