Skip to content

Commit cfdb923

Browse files
Merge pull request #1 from DanielVenturini/colordiff
- add download and install colordiff to Mac and Linux.
2 parents 4775da3 + 1784584 commit cfdb923

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
PREFIX ?= /usr/local
3+
SO := $(shell uname)
34

45
install: npm-diff
56
cp $< $(PREFIX)/bin/$<
@@ -9,3 +10,15 @@ uninstall:
910

1011
.PHONY: install uninstall
1112

13+
colordiff_linux:
14+
apt-get install colordiff --allow-unauthenticated -y
15+
16+
colordiff_mac:
17+
brew install colordiff
18+
19+
colordiff:
20+
ifeq ($(SO), Linux)
21+
make colordiff_linux
22+
else
23+
make colordiff_mac
24+
endif

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ $ npm-diff intersect 0.0.0 0.1.0 | less
3434
$ npm-diff intersect 0.0.0 0.1.0 | colordiff | less -R
3535
```
3636

37+
If you don't have [colordiff](http://www.colordiff.org), and want to use it (on the Linux, use sudo; in the Mac, don't use):
38+
39+
```bash
40+
$ make colordiff
41+
```
42+
3743
## Sponsors
3844

3945
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!

0 commit comments

Comments
 (0)