Skip to content

Commit 54c2728

Browse files
committed
Make frontend-build sed usage portable
1 parent eb23f20 commit 54c2728

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,13 @@ frontend-build:
4545
DATE=$$(date -u +"%Y-%m-%d %H:%M:%S UTC"); \
4646
TITLE="Payload Manager v$$VERSION by PLK ($$COMMIT, built at $$DATE)"; \
4747
echo "Updating title in index.html to: $$TITLE"; \
48-
sed -i '' "s/\[\[TITLE_PLACEHOLDER\]\]/$$TITLE/g" frontend/dist/index.html; \
48+
TMP=$$(mktemp "$${TMPDIR:-/tmp}/pldmgr.XXXXXX"); \
49+
sed "s|\[\[TITLE_PLACEHOLDER\]\]|$$TITLE|g" frontend/dist/index.html > $$TMP; \
50+
mv $$TMP frontend/dist/index.html; \
4951
echo "Updating build date in cache.appcache to: $$DATE"; \
50-
sed -i '' "s/\[\[BUILD_DATE\]\]/$$DATE/g" frontend/dist/cache.appcache
52+
TMP=$$(mktemp "$${TMPDIR:-/tmp}/pldmgr.XXXXXX"); \
53+
sed "s|\[\[BUILD_DATE\]\]|$$DATE|g" frontend/dist/cache.appcache > $$TMP; \
54+
mv $$TMP frontend/dist/cache.appcache
5155

5256

5357

0 commit comments

Comments
 (0)