File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed
Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -162,12 +162,16 @@ DESTDIR?=/usr/local
162162install :
163163 install -Dm 755 -s build/x86_64-pc-linux-gnu/release/xmq $(DESTDIR ) /bin/xmq
164164 install -Dm 755 scripts/xmq-less $(DESTDIR ) /bin/xmq-less
165+ install -Dm 755 scripts/xmq-diff $(DESTDIR ) /bin/xmq-diff
166+ install -Dm 755 scripts/xmq-meld $(DESTDIR ) /bin/xmq-meld
165167 install -Dm 644 doc/xmq.1 $(DESTDIR ) /man/man1/xmq.1
166168 install -Dm 644 scripts/autocompletion_for_xmq.sh /etc/bash_completion.d/xmq
167169
168170uninstall :
169171 rm -f $(DESTDIR ) /bin/xmq
170172 rm -f $(DESTDIR ) /bin/xmq-less
173+ rm -f $(DESTDIR ) /bin/xmq-diff
174+ rm -f $(DESTDIR ) /bin/xmq-meld
171175 rm -f $(DESTDIR ) /man/man1/xmq.1
172176 rm -f /etc/bash_completion.d/xmq
173177
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ if [ " $1 " = " " ] && [ -t 0 ]
4+ then
5+ # If input is a tty and no arguments, then print help.
6+ xmq
7+ exit 0
8+ fi
9+
10+ if [ " $2 " = " " ]
11+ then
12+ echo " Usage: xmq-diff <file> <file>"
13+ exit 0
14+ fi
15+
16+ first=$( mktemp /tmp/xmq-diff.XXXXXX)
17+ second=$( mktemp /tmp/xmq-diff.XXXXXX)
18+
19+ xmq " $1 " > $first
20+ xmq " $2 " > $second
21+
22+ diff $first $second
23+
24+ rm $first $second
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ if [ " $1 " = " " ] && [ -t 0 ]
4+ then
5+ # If input is a tty and no arguments, then print help.
6+ xmq
7+ exit 0
8+ fi
9+
10+ if [ " $2 " = " " ]
11+ then
12+ echo " Usage: xmq-diff <file> <file>"
13+ exit 0
14+ fi
15+
16+ first=$( mktemp /tmp/xmq-diff.XXXXXX)
17+ second=$( mktemp /tmp/xmq-diff.XXXXXX)
18+
19+ xmq " $1 " > $first
20+ xmq " $2 " > $second
21+
22+ meld $first $second
23+
24+ rm $first $second
You can’t perform that action at this time.
0 commit comments