File: list-modules.sh

package info (click to toggle)
syslog-ng 3.19.1-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 13,176 kB
  • sloc: ansic: 114,472; makefile: 4,697; sh: 4,391; python: 4,282; java: 4,047; xml: 2,435; yacc: 1,108; lex: 426; perl: 193; awk: 184
file content (26 lines) | stat: -rwxr-xr-x 835 bytes parent folder | download | duplicates (8)
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
#! /bin/sh

CORE_MODULES="syslog-ng-mod-sql syslog-ng-mod-mongodb"
ALL_MODULES=$(echo $(grep "^Package: syslog-ng-mod-" debian/control | cut -d: -f 2))

case "$1" in
        "core")
                echo ${CORE_MODULES} | tr ' ' ','
                ;;
        "all")
                echo ${ALL_MODULES}  | tr ' ' ','
                ;;
        "optional"|"")
                OPTIONAL_MODULES=""
                for mod in ${ALL_MODULES}; do
                        if ! (echo "${CORE_MODULES}" | grep -q ${mod}); then
                                OPTIONAL_MODULES="${OPTIONAL_MODULES}${mod} "
                        fi
                done
                OPTIONAL_MODULES=$(echo ${OPTIONAL_MODULES})
                echo ${OPTIONAL_MODULES} | tr ' ' ','
                ;;
        *)
                exit 1
                ;;
esac