repo.or.cz
/
hband-tools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
new tool: args2env
[hband-tools.git]
/
user-tools
/
PMhexdiff
blob
e56d9efcb424c9dd66f4ca9cc087ef6448e8b7a1
1
#!/bin/bash
2
3
true
<<EOF
4
=pod
5
6
=head1 NAME
7
8
PMdirindex - Poor man's hex diff viewer
9
10
=cut
11
12
EOF
13
14
opts
=
''
15
f1
=
''
16
f2
=
''
17
18
while
[
-n
"
$1
"
]
19
do
20
if
[
"
${1:0:1}
"
=
"-"
]
21
then
22
opts
=
"
$opts
$1
"
23
else
24
[
-z
"
$f1
"
] &&
f1
=
"
$1
"
|| f2
=
"
$1
"
25
fi
26
shift
27
done
28
29
${DIFF:-diff} $opts
<(
hd
-v
"
$f1
"
) <(
hd
-v
"
$f2
"
)