File: test-tasksel-desktop

package info (click to toggle)
debian-edu 2.13.5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 840 kB
  • sloc: sh: 111; makefile: 18
file content (41 lines) | stat: -rw-r--r-- 1,227 bytes parent folder | download | duplicates (5)
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
37
38
39
40
41
#!/bin/sh
#
# Check that tasksel pick the correct desktop environment.

DEBIAN_FRONTEND=noninteractive
export DEBIAN_FRONTEND

error=0

success() { echo success: "$@"; }
error() { error=1; echo error: "$@"; }

echo debian-edu-install debian-edu-install/profile multiselect Workstation \
    | debconf-set-selections

for desktop in kde gnome lxde xfce mate lxqt ; do
    echo tasksel tasksel/desktop multiselect "$desktop" \
	| debconf-set-selections
    wanted="education-desktop-$desktop"

    # Find the selected metapackages.
    selected=$(/usr/lib/education-tasks/edu-tasksel-setup tasksel \
	--new-install --test 2>&1 \
	| tr " " "\n" \
	| sort \
	| grep education-desktop \
	| grep -v education-desktop-other)

    if [ "$(echo $selected |wc -w)" -eq 1 ] ; then
	success "Only one desktop style selected for tasksel/desktop=$desktop"
    else
	error "Not only one desktop style selected for tasksel/desktop=$desktop: " $selected
    fi
    if echo $selected | grep -wq education-desktop-$desktop ; then
	success "tasksel selected $wanted for installation with tasksel/desktop=$desktop." 1>&2
    else
	error "tasksel did not select $wanted for installation with tasksel/desktop=$desktop." 1>&2
    fi
done

exit $error