Debian Codegraph @

debian/update-debian-edu-artwork-spacefun

raw symbols SCIP
1 #! /bin/shscip-shell filesystem . . `/bin/sh`.
2 set -e
3
4 THEMES="buster ceratopsian emerald homeworld softwaves spacefun"
5
6 basename="$(basenamescip-shell system . . basename. "$0")"
7 edutheme="${basename}"
8 edutheme="${edutheme#update-debian-edu-artwork-}"
9
10 if [scip-shell system . . `[`. "${edutheme}" = "${basename}" ]; then
11 echoscip-shell system . . echo. "${basename} script called directly, please call ${basename}-<theme> scripts (symlinks) instead."
12 exit 1
13 fi
14
15 set_active_themescip-shell shell debian-edu-artwork-legacy 20250915-3 set_active_theme().() {
16 upscip-shell system . . update-alternatives.date-alternativesscip-shell system . . update-alternatives. --install \scip-shell filesystem . . `/usr/share/desktop-base/active-theme`.
17 /usr/share/desktop-base/active-theme \
18 desktop-theme \
19 /usr/share/desktop-base/debian-edu-${edutheme}-theme 60
20 }
21
22 restore_active_themescip-shell shell debian-edu-artwork-legacy 20250915-3 restore_active_theme().() {
23 update-alternativesscip-shell system . . update-alternatives. --remove \
24 desktop-theme \
25 /usr/share/desktop-base/debian-edu-${edutheme}-theme
26 }
27
28 ## GRUB and PXE boot background
29 change_grub_backgroundscip-shell shell debian-edu-artwork-legacy 20250915-3 change_grub_background().() {
30 update-alternativesscip-shell system . . update-alternatives. --install /usr/share/images/desktop-base/desktop-grub.pngscip-shell filesystem . . `/usr/share/images/desktop-base/desktop-grub.png`. \
31 desktop-grub \
32 /usr/share/desktop-base/debian-edu-${edutheme}-theme/grub/grub-4x3.png 40 \
33 --slave /usr/share/desktop-base/grub_background.shscip-shell filesystem . . `/usr/share/desktop-base/grub_background.sh`. \
34 desktop-grub.sh \
35 /usr/share/desktop-base/debian-edu-${edutheme}-theme/grub/grub_background.sh
36 update-alternativesscip-shell system . . update-alternatives. --install /usr/share/images/desktop-base/desktop-grub.pngscip-shell filesystem . . `/usr/share/images/desktop-base/desktop-grub.png`. \
37 desktop-grub \
38 /usr/share/desktop-base/debian-edu-${edutheme}-theme/grub/grub-16x9.png 40 \
39 --slave /usr/share/desktop-base/grub_background.shscip-shell filesystem . . `/usr/share/desktop-base/grub_background.sh`. \
40 desktop-grub.sh \
41 /usr/share/desktop-base/debian-edu-${edutheme}-theme/grub/grub_background.sh
42 if command -v update-grub > /dev/nullscip-shell filesystem . . `/dev/null`. ; then
43 # We have seen situations where grub is installed at the end of an
44 # installation, but /boot/grub has not been created, yet, when running
45 # this postinst's script function code.
46 #
47 # This e.g. can be observed when installing debian-edu-router using FAI.
48 mkdirscip-shell system . . mkdir. -p /boot/grubscip-shell filesystem . . `/boot/grub`.
49
50 syncscip-shell system . . sync.
51 update-grub || truescip-shell system . . true.
52 fi
53 }
54
55 restore_grub_backgroundscip-shell shell debian-edu-artwork-legacy 20250915-3 restore_grub_background().() {
56 update-alternativesscip-shell system . . update-alternatives. --remove desktop-grub \
57 /usr/share/desktop-base/debian-edu-${edutheme}-theme/grub/grub-4x3.png
58 update-alternativesscip-shell system . . update-alternatives. --remove desktop-grub \
59 /usr/share/desktop-base/debian-edu-${edutheme}-theme/grub/grub-16x9.png
60 if command -v update-grub > /dev/nullscip-shell filesystem . . `/dev/null`. ; then
61 update-grub || truescip-shell system . . true.
62 fi
63 }
64
65 ## Wallpaper
66 change_desktop_backgroundscip-shell shell debian-edu-artwork-legacy 20250915-3 change_desktop_background().() {
67 upscip-shell system . . update-alternatives.date-alternativesscip-shell system . . update-alternatives. --install \scip-shell filesystem . . `/usr/share/images/desktop-base/desktop-background`.
68 /usr/share/images/desktop-base/desktop-background \
69 desktop-background \scip-shell filesystem . . `/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg`.
70 /usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg 70
71 upscip-shell system . . update-alternatives.date-alternativesscip-shell system . . update-alternatives. --install \scip-shell filesystem . . `/usr/share/images/desktop-base/desktop-background.xml`.
72 /usr/share/images/desktop-base/desktop-background.xml \
73 desktop-background.xml \scip-shell filesystem . . `/usr/share/desktop-base/active-theme/wallpaper/gnome-background.xml`.
74 /usr/share/desktop-base/active-theme/wallpaper/gnome-background.xml 50
75 upscip-shell system . . update-alternatives.date-alternativesscip-shell system . . update-alternatives. --install \scip-shell filesystem . . `/usr/share/images/desktop-base/desktop-background.xml`.
76 /usr/share/images/desktop-base/desktop-background.xml \
77 desktop-background.xml \
78 /usr/share/desktop-base/debian-edu-${edutheme}-theme/wallpaper/gnome-background.xml 50
79
80 for wallpaper in \
81 "/usr/share/desktop-base/debian-edu-${edutheme}-theme/wallpaper/contents/images/"[0-9]*x*.svg;
82 do
83 upscip-shell system . . update-alternatives.date-alternativesscip-shell system . . update-alternatives. --install \scip-shell filesystem . . `/usr/share/images/desktop-base/desktop-background`.
84 /usr/share/images/desktop-base/desktop-background \
85 desktop-background \
86 "${wallpaper}" 50
87 done
88 }
89
90 restore_desktop_backgroundscip-shell shell debian-edu-artwork-legacy 20250915-3 restore_desktop_background().() {
91 update-alternativesscip-shell system . . update-alternatives. --remove \
92 desktop-background \scip-shell filesystem . . `/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg`.
93 /usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg
94 update-alternativesscip-shell system . . update-alternatives. --remove \
95 desktop-background.xml \
96 /usr/share/desktop-base/debian-edu-${edutheme}-theme/wallpaper/gnome-background.xml
97
98 for wallpaper in \
99 "/usr/share/desktop-base/debian-edu-${edutheme}-theme/wallpaper/contents/images/"[0-9]*x*.svg;
100 do
101 update-alternativesscip-shell system . . update-alternatives. --remove \
102 desktop-background \
103 "${wallpaper}"
104 done
105 }
106
107 ## Plymouth
108 set_plymouth_themescip-shell shell debian-edu-artwork-legacy 20250915-3 set_plymouth_theme().() {
109 # The check whether we are on a Debian Edu system is vital for this part of
110 # the script being compliant with Debian policy. Never remove that check!
111 # See: #1057815 and #856789.
112 if [scip-shell system . . `[`. -f /etc/plymouth/plymouthd.confscip-shell filesystem . . `/etc/plymouth/plymouthd.conf`. ] && [scip-shell system . . `[`. -f /etc/debian-edu/configscip-shell filesystem . . `/etc/debian-edu/config`. ] && command -v plymouth-set-default-theme > /dev/nullscip-shell filesystem . . `/dev/null`. ; then
113 plymouth-set-default-theme -R debian-edu-${edutheme} || truescip-shell system . . true.
114 fi
115 }
116
117 restore_plymouth_themescip-shell shell debian-edu-artwork-legacy 20250915-3 restore_plymouth_theme().() {
118 if [scip-shell system . . `[`. -f /etc/plymouth/plymouthd.confscip-shell filesystem . . `/etc/plymouth/plymouthd.conf`. ] && command -v plymouth-set-default-theme > /dev/nullscip-shell filesystem . . `/dev/null`. ; then
119 plymouth-set-default-theme -R -r || truescip-shell system . . true.
120 fi
121 }
122
123 ## Lockscreen
124 set_lockscreenscip-shell shell debian-edu-artwork-legacy 20250915-3 set_lockscreen().() {
125 upscip-shell system . . update-alternatives.date-alternativesscip-shell system . . update-alternatives. --install \scip-shell filesystem . . `/usr/share/images/desktop-base/desktop-lockscreen.xml`.
126 /usr/share/images/desktop-base/desktop-lockscreen.xml \
127 desktop-lockscreen.xml \
128 /usr/share/desktop-base/debian-edu-${edutheme}-theme/lockscreen/gnome-background.xml 50
129 }
130
131 restore_lockscreenscip-shell shell debian-edu-artwork-legacy 20250915-3 restore_lockscreen().() {
132 update-alternativesscip-shell system . . update-alternatives. --remove \
133 desktop-lockscreen.xml \
134 /usr/share/desktop-base/debian-edu-${edutheme}-theme/lockscreen/gnome-background.xml
135 }
136
137 is_valid=false
138 for theme in $THEMES; do
139 if [scip-shell system . . `[`. "${edutheme}" = "${theme}" ]; then
140 is_valid=true
141 fi
142 done
143 $is_valid || exit 1
144
145 case "$1" in
146 configure)
147 for theme in $THEMES; do
148 [scip-shell system . . `[`. "${theme}" = "${edutheme}" ] && continue
149 if [scip-shell system . . `[`. -x "/usr/sbin/update-debian-edu-artwork-${theme}" ]; then
150 "/usr/sbin/update-debian-edu-artwork-${theme}" remove
151 fi
152 done
153 set_active_themescip-shell shell debian-edu-artwork-legacy 20250915-3 set_active_theme().
154 change_grub_backgroundscip-shell shell debian-edu-artwork-legacy 20250915-3 change_grub_background().
155 change_desktop_backgroundscip-shell shell debian-edu-artwork-legacy 20250915-3 change_desktop_background().
156 set_plymouth_themescip-shell shell debian-edu-artwork-legacy 20250915-3 set_plymouth_theme().
157 set_lockscreenscip-shell shell debian-edu-artwork-legacy 20250915-3 set_lockscreen().
158 ;;
159 remove)
160 restore_active_themescip-shell shell debian-edu-artwork-legacy 20250915-3 restore_active_theme().
161 restore_grub_backgroundscip-shell shell debian-edu-artwork-legacy 20250915-3 restore_grub_background().
162 restore_desktop_backgroundscip-shell shell debian-edu-artwork-legacy 20250915-3 restore_desktop_background().
163 restore_plymouth_themescip-shell shell debian-edu-artwork-legacy 20250915-3 restore_plymouth_theme().
164 restore_lockscreenscip-shell shell debian-edu-artwork-legacy 20250915-3 restore_lockscreen().
165 ;;
166 esac