Debian Codegraph @

debian/postinst

raw symbols SCIP
1 #!/bin/sh
2
3 set -e
4
5 #DEBHELPER#
6
7 FC_BASE="/usr/share/fvwm-crystal/fvwm"
8 FC_ICONBASE="${FC_BASE}/icons/Default"
9 FC_APPBASE="${FC_BASE}/Applications/debian"
10
11 SIZES="22x22 32x32 48x48"
12
13 # versions 3.0-1 - 3.0.3-1 of the package put the debianmenu in
14 # /usr/share/fvwm-crystal. Since then the debian menu resides in
15 # /var/lib/fvwm-crystal. Since function removes the menu from the
16 # old location, if present, when upgrading to this version.
17 removeLegacyMenu() {
18 if [ ! -d "${FC_APPBASE}" ]; then return; fi
19 for size in ${SIZES}; do
20 if [ ! -d "${FC_ICONBASE}/${size}/debianmenu/" ]; then
21 continue
22 fi
23 for file in `find ${FC_ICONBASE}/${size}/debianmenu/ -name "*.png"`; do
24 rm -f -- "`readlink "${file}"`"
25 rm -f -- "${file}"
26 done
27 rmdir --ignore-fail-on-non-empty "${FC_ICONBASE}/${size}/debianmenu/"
28 done
29 rm -rf -- "${FC_APPBASE}"
30 }
31
32 removeLegacyMenu
33
34 if [ "$1" = "configure" ]; then
35 update-alternatives --install /usr/bin/x-window-manager x-window-manager \
36 /usr/bin/fvwm-crystal 50 \
37 --slave /usr/share/man/man1/x-window-manager.1.gz \
38 x-window-manager.1.gz \
39 /usr/share/man/man1/fvwm-crystal.1.gz
40 fi
41