#! /bin/bash set -e case "$1" in configure) if [ -e /usr/sbin/grub-mkconfig ] ; then GRUBDEFAULT="/etc/default/grub" if [ -e "$GRUBDEFAULT" ] ; then if (grep '^GRUB_BACKGROUND' "$GRUBDEFAULT" > /dev/null 2>&1) ; then sed -i 's@^GRUB_BACKGROUND.*$@GRUB_BACKGROUND="/usr/share/blorand/blorand.png"@g' "$GRUBDEFAULT" else echo 'GRUB_BACKGROUND="/usr/share/blorand/blorand.png"' >> "$GRUBDEFAULT" fi fi /usr/sbin/grub-mkconfig -o /boot/grub/grub.cfg fi cat /usr/share/blorand/vimrc.blorand | while read line ; do if ! grep "$line" /etc/vim/vimrc.local > /dev/null 2>&1 ; then echo "$line" >> /etc/vim/vimrc.local fi done install -Dvm 0755 /usr/share/blorand/blorand.profile /etc/profile.d/blorand.sh ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 0 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. exit 0