Skip to content
This repository

Allow installation on systems without GNU sed #560

Closed
wants to merge 1 commit into from

2 participants

Ryan Kavanagh Yann Hodique
Ryan Kavanagh

GNU sed's -i option is a non-standard extension. Instead, use output redirection
to achieve our goal.

Ryan Kavanagh Allow installation on systems without GNU sed
GNU sed's -i option is a non-standard extension. Instead, use output redirection
to achieve our goal.
4a35c8e
Yann Hodique
Owner

ok for removing sed -i, but the redirection looks ugly to me.

Fixed differently in commit d735607, by using ed.

Yann Hodique sigma closed this February 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 19, 2013
Ryan Kavanagh Allow installation on systems without GNU sed
GNU sed's -i option is a non-standard extension. Instead, use output redirection
to achieve our goal.
4a35c8e
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 4 additions and 5 deletions. Show diff stats Hide diff stats

  1. 9  Makefile
9  Makefile
@@ -57,9 +57,8 @@ magit-$(VERSION).tar.gz: $(DIST_FILES) $(DIST_FILES_CONTRIB)
57 57
 	mkdir -p magit-$(VERSION)/contrib
58 58
 	cp -p $(DIST_FILES) magit-$(VERSION)
59 59
 	cp -p $(DIST_FILES_CONTRIB) magit-$(VERSION)/contrib
60  
-	sed -i -e "1 s/=.*/=$(VERSION)/" magit-$(VERSION)/Makefile #NO_DIST
61  
-	sed -i -e "/NO_DIST/d" magit-$(VERSION)/Makefile #NO_DIST
62  
-	sed -i -e "s/@GIT_DEV_VERSION@/$(VERSION)/" magit-$(VERSION)/magit.el #NO_DIST
  60
+	sed -e "1 s/=.*/=$(VERSION)/" -e "/NO_DIST/d" Makefile > magit-$(VERSION)/Makefile #NO_DIST
  61
+	sed -e "s/@GIT_DEV_VERSION@/$(VERSION)/" magit.el > magit-$(VERSION)/magit.el #NO_DIST
63 62
 	tar -cvzf magit-$(VERSION).tar.gz magit-$(VERSION)
64 63
 	rm -rf magit-$(VERSION)
65 64
 
@@ -68,7 +67,7 @@ elpa: magit-$(VERSION).tar
68 67
 magit-$(VERSION).tar: $(ELPA_FILES)
69 68
 	mkdir magit-$(VERSION)
70 69
 	cp -p $(ELPA_FILES) magit-$(VERSION)
71  
-	sed -i -e "s/@GIT_DEV_VERSION@/$(VERSION)/" magit-$(VERSION)/magit.el #NO_DIST
  70
+	sed -e "s/@GIT_DEV_VERSION@/$(VERSION)/" magit.el > magit-$(VERSION)/magit.el #NO_DIST
72 71
 	tar -cvf magit-$(VERSION).tar magit-$(VERSION)
73 72
 	rm -rf magit-$(VERSION)
74 73
 
@@ -77,7 +76,7 @@ install: install_core install_docs
77 76
 install_core: core
78 77
 	mkdir -p $(ELISP_INSTALL_DIR)
79 78
 	install -m 644 $(ELS) $(ELCS) $(ELISP_INSTALL_DIR)
80  
-	sed -i -e "s/@GIT_DEV_VERSION@/$(VERSION)/" $(ELISP_INSTALL_DIR)/magit.el #NO_DIST
  79
+	sed -e "s/@GIT_DEV_VERSION@/$(VERSION)/" magit.el > $(ELISP_INSTALL_DIR)/magit.el #NO_DIST
81 80
 	mkdir -p $(DESTDIR)$(SYSCONFDIR)/emacs/site-start.d
82 81
 	install -m 644 50magit.el $(DESTDIR)$(SYSCONFDIR)/emacs/site-start.d/50magit.el
83 82
 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.