This file is indexed.

postinst is in r-base-core 3.2.3-4.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh
#
# postinst script for the Debian GNU/Linux r-base-core package
# This version originally written by Douglas Bates <bates@stat.wisc.edu>
# and now written and maintained by Dirk Eddelbuettel <edd@debian.org>

set -e


    
    
case "$1" in
  configure)
    # edd 19 Jun 2004   deal with papersize 
    # edd 22 Jun 2004   make that conditional on paperconf
    # edd 25 Oct 2006   rewritten for R 2.4.0 and R_PAPERSIZE_USER
    # edd 21 Jun 2008   rewritten for R 2.7.1 and ucf input 
    # edd 23 Feb 2013   trying to avoid md5sum issues with help from Andy Beckman
    # edd 26 Feb 2013   correct mode of temp. Renviron file with help from Don Armstrong
    tmpRenviron=$(mktemp)
    chmod 0644 "$tmpRenviron"
    cat /usr/lib/R/etc/Renviron.ucf > "$tmpRenviron"
    #if [ -x /usr/bin/paperconf ]; then
        ## get the value we want from Debian's paperconf utility
        papersize=`paperconf`
	## have perl subst. second expression with $papersize for first
	## uses the x mod. and curlies to denote the usual s|1st|2nd|
	perl -p -i -e "s{^R_PAPERSIZE_USER=\\$\{R_PAPERSIZE\}}
		{R_PAPERSIZE_USER=\\$\{R_PAPERSIZE-'$papersize'\}}x" "$tmpRenviron"
    #fi
    # edd 21 Jun 2008  whether or not Renviron was modified, ucf will handle it, 
    #                  so tell ucf that file Renviron.ucf is the source for 
    #                  conffile in /etc and register it
    ucf "$tmpRenviron" /etc/R/Renviron
    ucfr r-base-core /etc/R/Renviron
    rm -f "$tmpRenviron"
    #
    #if [ -x /usr/bin/update-menus ]; then
    #  update-menus 
    #fi

    # edd 03 Apr 2003  cf Section 10.1.2 of Debian Policy
    if [ ! -e /usr/local/lib/R ]; then
      if mkdir /usr/local/lib/R 2>/dev/null; then
	chown root:staff /usr/local/lib/R
	chmod 2775 /usr/local/lib/R
      fi
    fi
    if [ ! -e /usr/local/lib/R/site-library ]; then
      if mkdir /usr/local/lib/R/site-library 2>/dev/null; then
	chown root:staff /usr/local/lib/R/site-library
	chmod 2775 /usr/local/lib/R/site-library
      fi
    fi

    #if [ -x /usr/bin/mktexlsr ]; then
    #  mktexlsr /usr/share/texmf
    #fi
    ;;
  abort-upgrade|abort-remove|abort-deconfigure)
    ;;
  *)
    echo "postinst called with unknown argument \`$1'" >&2
    ;;
esac