File: mock-kreadconfig5

package info (click to toggle)
xdg-utils 1.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,508 kB
  • sloc: sh: 7,900; xml: 3,213; perl: 274; makefile: 201; awk: 41
file content (36 lines) | stat: -rwxr-xr-x 697 bytes parent folder | download | duplicates (2)
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
29
30
31
32
33
34
35
36
#!/bin/sh
set -e

abort() {
    echo "mock-kreadconfig5: $*" >&2
    exit 1
}

group=
key=
while [ -n "$1" ]; do
    case "$1" in
        --file)
            [ "$2" = emaildefaults ] ||
                abort "expected: --file emaildefaults, got: --file $2"
            ;;
        --group)
            group="$2"
            ;;
        --key)
            key="$2"
            ;;
        *)
            abort "unknown argument: $1"
            ;;
    esac
    shift 2
done

if [ "$group" = Defaults ] && [ "$key" = Profile ]; then
    echo DefProf
elif [ "$group" = PROFILE_DefProf ] && [ "$key" = EmailClient ]; then
    echo "thunderbird %u"
else
    abort "unknown group $group with key $key"
fi