Browse Source
The 'diff-highlight' program (in contrib/) has been restructured for easier reuse by an external project 'diff-so-fancy'. * jk/diff-highlight-module: diff-highlight: split code into modulemaint

5 changed files with 82 additions and 19 deletions
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
shebang.perl |
||||
diff-highlight |
@ -1,5 +1,20 @@
@@ -1,5 +1,20 @@
|
||||
# nothing to build |
||||
all: |
||||
all: diff-highlight |
||||
|
||||
test: |
||||
PERL_PATH = /usr/bin/perl |
||||
-include ../../config.mak |
||||
|
||||
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) |
||||
|
||||
diff-highlight: shebang.perl DiffHighlight.pm diff-highlight.perl |
||||
cat $^ >$@+ |
||||
chmod +x $@+ |
||||
mv $@+ $@ |
||||
|
||||
shebang.perl: FORCE |
||||
@echo '#!$(PERL_PATH_SQ)' >$@+ |
||||
@cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@ |
||||
|
||||
test: all |
||||
$(MAKE) -C t |
||||
|
||||
.PHONY: FORCE |
||||
|
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
package main; |
||||
|
||||
# Some scripts may not realize that SIGPIPE is being ignored when launching the |
||||
# pager--for instance scripts written in Python. |
||||
$SIG{PIPE} = 'DEFAULT'; |
||||
|
||||
DiffHighlight::highlight_stdin(); |
||||
exit 0; |
Loading…
Reference in new issue