~ubuntu-branches/ubuntu/trusty/kubuntu-settings/trusty

« back to all changes in this revision

Viewing changes to debian/plymouth-theme-kubuntu-text.postinst

  • Committer: Package Import Robot
  • Author(s): Harald Sitter
  • Date: 2013-10-03 14:25:19 UTC
  • Revision ID: package-import@ubuntu.com-20131003142519-gf3zsl15hroh6gyf
Tags: 1:13.10ubuntu12
* Change all maintainer scripts to not ever faile despite set -e.
  LP: #1005555, LP: #1044690
* Change all maintainer scripts to use a 4 space indent rather than tabs.
* Change all maintainer scripts to use sh -e rather than explicit set -e.
* Change all maintainer scripts to explicitly exit with 0 on end.
* Change all maintainer scripts to use single line if;then.
* Remove usage comments from all maintainer scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh -e
2
 
# This script can be called in the following ways:
3
 
#
4
 
# After the package was installed:
5
 
#       <postinst> configure <old-version>
6
 
#
7
 
#
8
 
# If prerm fails during upgrade or fails on failed upgrade:
9
 
#       <old-postinst> abort-upgrade <new-version>
10
 
#
11
 
# If prerm fails during deconfiguration of a package:
12
 
#       <postinst> abort-deconfigure in-favour <new-package> <version>
13
 
#                  removing <old-package> <version>
14
 
#
15
 
# If prerm fails during replacement due to conflict:
16
 
#       <postinst> abort-remove in-favour <new-package> <version>
17
 
 
18
2
 
19
3
case "$1" in
20
4
    configure|triggered)
21
 
        sed -re \
22
 
                "/\[ubuntu-text\]/ {
23
 
                        N;
24
 
                        s/(title=Kubuntu ).*\$/\1$(lsb_release -rs)/
25
 
                }" /lib/plymouth/themes/kubuntu-text/kubuntu-text.plymouth.in \
26
 
                        > /lib/plymouth/themes/kubuntu-text/kubuntu-text.plymouth
27
 
        update-alternatives \
28
 
                --install /lib/plymouth/themes/text.plymouth text.plymouth \
29
 
                /lib/plymouth/themes/kubuntu-text/kubuntu-text.plymouth 60
 
5
        sed -re \
 
6
            "/\[ubuntu-text\]/ {
 
7
                    N;
 
8
                    s/(title=Kubuntu ).*\$/\1$(lsb_release -rs)/
 
9
            }" /lib/plymouth/themes/kubuntu-text/kubuntu-text.plymouth.in \
 
10
                    > /lib/plymouth/themes/kubuntu-text/kubuntu-text.plymouth
 
11
        update-alternatives \
 
12
            --install /lib/plymouth/themes/text.plymouth text.plymouth \
 
13
            /lib/plymouth/themes/kubuntu-text/kubuntu-text.plymouth 60
30
14
 
31
 
        if which update-initramfs >/dev/null 2>&1
32
 
        then
33
 
            update-initramfs -u
34
 
        fi
35
 
        ;;
 
15
        if which update-initramfs >/dev/null 2>&1; then
 
16
            update-initramfs -u || echo "Failed to update-initramfs - BROKEN SETUP?."
 
17
        fi
 
18
        ;;
36
19
 
37
20
    abort-upgrade|abort-deconfigure|abort-remove)
38
 
        ;;
 
21
        ;;
39
22
 
40
23
    *)
41
 
        echo "$0 called with unknown argument \`$1'" 1>&2
42
 
        exit 1
43
 
        ;;
 
24
        echo "$0 called with unknown argument \`$1'" 1>&2
 
25
        exit 1
 
26
        ;;
44
27
esac
45
28
 
46
29
#DEBHELPER#