Permalink
Browse files

replace echo's by printf in the Makefile

echo is inconsistent regarding the treatment of escaped characters (like
'\n'). It replaces them in zsh, but not in bash, for instance. printf is
more portable.
  • Loading branch information...
1 parent c2824dc commit d42186639a367a539291647908ba6a866bdc345f @aroig aroig committed with sigma Mar 4, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 Makefile
View
@@ -57,9 +57,9 @@ magit-$(VERSION).tar.gz: $(DIST_FILES) $(DIST_FILES_CONTRIB)
mkdir -p magit-$(VERSION)/contrib
cp -p $(DIST_FILES) magit-$(VERSION)
cp -p $(DIST_FILES_CONTRIB) magit-$(VERSION)/contrib
- echo "1s/=.*/=$(VERSION)/\nw" | ed -s magit-$(VERSION)/Makefile #NO_DIST
- echo "g/NO_DIST/d\nw" | ed -s magit-$(VERSION)/Makefile #NO_DIST
- echo ",s/@GIT_DEV_VERSION@/$(VERSION)/\nw" | ed -s magit-$(VERSION)/magit.el #NO_DIST
+ printf "1s/=.*/=$(VERSION)/\nw\n" | ed -s magit-$(VERSION)/Makefile #NO_DIST
+ printf "g/NO_DIST/d\nw\n" | ed -s magit-$(VERSION)/Makefile #NO_DIST
+ printf ",s/@GIT_DEV_VERSION@/$(VERSION)/\nw\n" | ed -s magit-$(VERSION)/magit.el #NO_DIST
tar -cvzf magit-$(VERSION).tar.gz magit-$(VERSION)
rm -rf magit-$(VERSION)
@@ -68,7 +68,7 @@ elpa: magit-$(VERSION).tar
magit-$(VERSION).tar: $(ELPA_FILES)
mkdir magit-$(VERSION)
cp -p $(ELPA_FILES) magit-$(VERSION)
- echo ",s/@GIT_DEV_VERSION@/$(VERSION)/\nw" | ed -s magit-$(VERSION)/magit.el #NO_DIST
+ printf ",s/@GIT_DEV_VERSION@/$(VERSION)/\nw\n" | ed -s magit-$(VERSION)/magit.el #NO_DIST
tar -cvf magit-$(VERSION).tar magit-$(VERSION)
rm -rf magit-$(VERSION)
@@ -77,7 +77,7 @@ install: install_core install_docs
install_core: core
mkdir -p $(ELISP_INSTALL_DIR)
install -m 644 $(ELS) $(ELCS) $(ELISP_INSTALL_DIR)
- echo ",s/@GIT_DEV_VERSION@/$(VERSION)/\nw" | ed -s $(ELISP_INSTALL_DIR)/magit.el #NO_DIST
+ printf ",s/@GIT_DEV_VERSION@/$(VERSION)/\nw\n" | ed -s $(ELISP_INSTALL_DIR)/magit.el #NO_DIST
mkdir -p $(DESTDIR)$(SYSCONFDIR)/emacs/site-start.d
install -m 644 50magit.el $(DESTDIR)$(SYSCONFDIR)/emacs/site-start.d/50magit.el

0 comments on commit d421866

Please sign in to comment.