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

Closed
opened 2023-10-12 14:51:59 +00:00 by mih · 1 comment
mih commented 2023-10-12 14:51:59 +00:00 (Migrated from github.com)

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

It simply fails to detect the matching existing records (with `grep`) and adds new ones that get windows line endings when committed.
mih commented 2023-10-13 07:35:59 +00:00 (Migrated from github.com)

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 $@"; }

 #

Here is a patch ```diff 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 $@"; } # ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
remodnav/paper#26
No description provided.