~ubuntu-branches/ubuntu/quantal/icu/quantal

« back to all changes in this revision

Viewing changes to debian/icu.postinst.in

  • Committer: Package Import Robot
  • Author(s): Yves Arrouye
  • Date: 2002-03-03 15:31:13 UTC
  • Revision ID: package-import@ubuntu.com-20020303153113-3ssceqlq45xbmbnc
Tags: upstream-2.0-2.1pre20020303
ImportĀ upstreamĀ versionĀ 2.0-2.1pre20020303

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
# postinst script for foo
 
3
#
 
4
# see: dh_installdeb(1)
 
5
 
 
6
set -e
 
7
 
 
8
# summary of how this script can be called:
 
9
#        * <postinst> `configure' <most-recently-configured-version>
 
10
#        * <old-postinst> `abort-upgrade' <new version>
 
11
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
 
12
#          <new-version>
 
13
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
 
14
#          <failed-install-package> <version> `removing'
 
15
#          <conflicting-package> <version>
 
16
# for details, see /usr/share/doc/packaging-manual/
 
17
#
 
18
# quoting from the policy:
 
19
#     Any necessary prompting should almost always be confined to the
 
20
#     post-installation script, and should be protected with a conditional
 
21
#     so that unnecessary prompting doesn't happen if a package's
 
22
#     installation fails and the `postinst' is called with `abort-upgrade',
 
23
#     `abort-remove' or `abort-deconfigure'.
 
24
 
 
25
case "$1" in
 
26
    configure)
 
27
        # Adjust the current ICU link in @libdir@/@PACKAGE@
 
28
 
 
29
        prefix=@prefix@
 
30
        exec_prefix=@exec_prefix@
 
31
 
 
32
        if [ -d @libdir@/@PACKAGE@ ]
 
33
        then
 
34
            icucurrent=`2>/dev/null ls -dp @libdir@/@PACKAGE@/* | sed -n 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
 
35
            cd @libdir@/@PACKAGE@
 
36
            rm -f current
 
37
            if test x"$icucurrent" != x
 
38
            then
 
39
                ln -s "$icucurrent" current
 
40
            fi
 
41
 
 
42
            # Set ICU_DATA for ease of testing files. It is not necessary to
 
43
            # export it as we are guaranteed that the binaries we invoke will
 
44
            # use the right directory. But we're not taking chances with the
 
45
            # future :)
 
46
 
 
47
            ICU_DATA=@libdir@/@PACKAGE@/@VERSION@
 
48
            export ICU_DATA
 
49
 
 
50
            if test ! -f $ICU_DATA/cnvalias.dat -o @sysconfdir@/icu/convrtrs.txt -nt $ICU_DATA/cnvalias.dat
 
51
            then
 
52
                echo Compiling converters and aliases list from @sysconfdir@/@PACKAGE@/convrtrs.txt
 
53
                @sbindir@/gencnval @sysconfdir@/@PACKAGE@/convrtrs.txt
 
54
            fi
 
55
 
 
56
        fi
 
57
    ;;
 
58
 
 
59
    abort-upgrade|abort-remove|abort-deconfigure)
 
60
 
 
61
    ;;
 
62
 
 
63
    *)
 
64
        echo "postinst called with unknown argument \`$1'" >&2
 
65
        exit 0
 
66
    ;;
 
67
esac
 
68
 
 
69
# dh_installdeb will replace this with shell code automatically
 
70
# generated by other debhelper scripts.
 
71
 
 
72
#DEBHELPER#
 
73
 
 
74
exit 0
 
75