Skip to content

Commit

Permalink
refactor: merge sed filters
Browse files Browse the repository at this point in the history
  • Loading branch information
QGarchery committed Dec 5, 2024
1 parent 52a62ed commit ed091a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions certora/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ munged-simple: $(wildcard ../src/*.sol) applyHarnessSimple.patch
@patch -p0 -d munged-simple < applyHarnessSimple.patch

record-simple:
diff -ruN ../src munged-simple | sed 's+\.\./src/++g' | sed 's+munged-simple/++g' | sed 's,\(\-\-\- [^[:space:]]*\).*,\1,' | sed 's,\(+++ [^[:space:]]*\).*,\1,' > applyHarnessSimple.patch
diff -ruN ../src munged-simple | sed 's,\.\./src/\|munged-simple/,,g' | sed 's,\(\(\-\-\-\|+++\) [^[:space:]]*\).*,\1,' > applyHarnessSimple.patch

munged-fifo: $(wildcard ../src/*.sol) applyHarnessFifo.patch
@rm -rf munged-fifo
@cp -r ../src munged-fifo
@patch -p0 -d munged-fifo < applyHarnessFifo.patch

record-fifo:
diff -ruN ../src munged-fifo | sed 's+\.\./src/++g' | sed 's+munged-fifo/++g' | sed 's,\(\-\-\- [^[:space:]]*\).*,\1,' | sed 's,\(+++ [^[:space:]]*\).*,\1,' > applyHarnessFifo.patch
diff -ruN ../src munged-fifo | sed 's,\.\./src/\|munged-fifo/,,g' | sed 's,\(\(\-\-\-\|+++\) [^[:space:]]*\).*,\1,' > applyHarnessFifo.patch

clean:
rm -rf munged-simple munged-fifo

.PHONY: help clean # do not add munged here, as it is useful to protect munged edits
.PHONY: help clean record-simple record-fifo # do not add munged folders here, as it is useful to protect munged edits

0 comments on commit ed091a1

Please sign in to comment.