summaryrefslogtreecommitdiff
path: root/bin/antimatter-digest
blob: d62a1f8e75580356bd959153ee6998ec19ff7551 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

. /etc/profile

set -e

TMPL_PATH="$(dirname "${0}")/antimatter"
HEADER_PATH="${TMPL_PATH}/antimatter.html.header"
FOOTER_PATH="${TMPL_PATH}/antimatter.html.footer"
ANTIMATTER="${ANTIMATTER:-antimatter}"

(
    cat "${HEADER_PATH}"

    # Upgradable packages
    "${ANTIMATTER}" -u --quiet --extended --html

    # Dead packages (dropped by upstream)
    "${ANTIMATTER}" -e --quiet --extended --html

    # New packages - temp disabled
    # "${ANTIMATTER}" -n --quiet --extended --html
    # cat "${FOOTER_PATH}"

) | sed \
    -e "s|class='rt'|style='color: green;'|g" \
    -e "s|class='frompkg'|style='color: brown;'|g" \
    -e "s|class='topkg'|style='font-weight: bold; color: red;'|g"