summaryrefslogtreecommitdiff
path: root/librewolf/debian/browser.bug-script.in
blob: a596a97a9d0287f6744b2b554906fec8a8bd6283 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

# Don't run as root
[ "$(id -u)" -eq 0 ] && exit

tmp="$(mktemp)"
tmp2="$(mktemp)"
@browser@ -dump-addons-info "$tmp"
awk -F: '$1 == "Location" {print $2}' "$tmp" | xargs dpkg -S 2>/dev/null > "$tmp2"
echo >&3
awk -F": " 'BEGIN { while (i = getline < "'"$tmp2"'") { p[$2] = $1; } }
            { print $0 }
            $1 == "Location" && p[$2] { print "Package: " p[$2] }' "$tmp" >&3

echo >&3
echo -- Addons package information >&3
awk -F": " '{ print $1 }' "$tmp2" | sort -u | COLUMNS=79 xargs -r dpkg -l 2> /dev/null | grep ^i >&3

rm -f "$tmp" "$tmp2"
bgstack15