Rev 23869 | Blame | Last modification | View Log | Download | RSS feed
#!/bin/sh## postinst script for the Debian GNU/Linux r-base-core package# This version originally written by Douglas Bates <bates@stat.wisc.edu>set -e#DEBHELPER#case "$1" inconfigure)#if [ -x /usr/bin/paperconf ]#then# perl -pi -e \# '$P=`/usr/bin/paperconf`,chop $P,s:a4:$P: if /{R_PAPERSIZE/' /usr/bin/R#fi# edd 19 June 2004 deal with papersize# edd 22 June 2004 make that conditional on paperconfif [ -x /usr/bin/paperconf ]then#Sysfile=`/etc/papersize`#syspaper=`cat $Sysfile`syspaper=`/usr/bin/paperconf`#echo "Papersize in /etc is $syspaper"Rfile=/etc/R/Renvironrpaper=`grep ^R_PAPERSIZE $Rfile | cut -d"'" -f2`#echo "Papersize in Renviron is $rpaper"if [ "$syspaper" != "$rpaper" ]thenecho "Changing R_PAPERSIZE from $rpaper with $syspaper"perl -p -i -e "s|\'$rpaper\'|\'$syspaper\'|" "$Rfile"fifiif [ -x /usr/bin/update-menus ]thenupdate-menusfi# edd 03 Apr 2003 cf Section 10.1.2 of Debian Policyif [ ! -e /usr/local/lib/R ]thenif mkdir /usr/local/lib/R 2>/dev/nullthenchown root:staff /usr/local/lib/Rchmod 2775 /usr/local/lib/Rfifiif [ ! -e /usr/local/lib/R/site-library ]thenif mkdir /usr/local/lib/R/site-library 2>/dev/nullthenchown root:staff /usr/local/lib/R/site-librarychmod 2775 /usr/local/lib/R/site-libraryfifi;;abort-upgrade|abort-remove|abort-deconfigure);;*)echo "postinst called with unknown argument \`$1'" >&2;;esac