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
/
debdiff
blob
35e3faeec708251a68c06d540d84056a1015fa27
1
#!/bin/bash
2
3
true
<<EOF
4
=pod
5
6
=head1 NAME
7
8
debdiff - Display differences between 2 Debian packages (*.deb files)
9
10
=cut
11
12
EOF
13
14
15
view_deb
()
16
{
17
dpkg-deb
-I
"
$1
"
18
echo
19
dpkg-deb
-c
"
$1
"
|
sort
-k6
20
}
21
22
declare -a
opts
23
f1
=
''
24
f2
=
''
25
26
while
[
-n
"
$1
"
]
27
do
28
case
"
$1
"
in
29
-*)
30
opts
+=(
"
$1
"
)
31
;;
32
*)
33
if
[
-z
"
$f1
"
]
34
then
35
f1
=
$1
36
elif
[
-z
"
$f2
"
]
37
then
38
f2
=
$1
39
else
40
opts
+=(
"
$1
"
)
41
fi
42
;;
43
esac
44
shift
45
done
46
47
diff
"
${opts[@]}
"
<(
view_deb
"
$f1
"
) <(
view_deb
"
$f2
"
)