Skip to content

Commit

Permalink
Sed in the blib directory before install
Browse files Browse the repository at this point in the history
Sed when not making packages resulted in `grep -rl --null "@@" .`
which includes _everything_ also the .git directory and one of the git
.pack files contained a match for the sed expression thereby corrupting
the git checkout.  And also not making any substitutions in the
installed files in /usr/local...  So sed has to be done prior to install
in the blib directory.
  • Loading branch information
yunal authored and steveschnepp committed Jul 26, 2023
1 parent 773972d commit 13df648
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ doc:

.PHONY: install
install: $(BUILD_SCRIPT)
"$(BUILD_SCRIPT)" install --destdir="$(DESTDIR)" --verbose
@# various directory placeholders (e.g. "@@SPOOLDIR@@") need to be replaced
grep -rl --null "@@" "$(or $(DESTDIR),.)" | xargs -0 sed -i \
grep -Irl --null "@@" blib | xargs -0 sed -i \
-e "$$(perl -I lib -M"Munin::Common::Defaults" \
-e "Munin::Common::Defaults->print_as_sed_substitutions();")"
-e "Munin::Common::Defaults->print_as_sed_substitutions();")"
"$(BUILD_SCRIPT)" install --destdir="$(DESTDIR)" --verbose


.PHONY: apply-formatting
apply-formatting:
Expand Down

0 comments on commit 13df648

Please sign in to comment.