#!/bin/sh # postinst script for itzks-systems-smartboard # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package SMARTBOARD_CHROOT="/srv/schroot/precise-i386-smartboard-ITZkS" ICON_SYMLINKS=" 128x128/mimetypes/application-x-smarttech-galleryitem.png\n 128x128/mimetypes/application-x-smarttech-gallery.png\n 128x128/mimetypes/gnome-mime-application-x-smarttech-notebook.png\n 128x128/mimetypes/gnome-mime-application-x-smarttech-gallery.png\n 128x128/mimetypes/application-x-smarttech-notebook.png\n 128x128/mimetypes/gnome-mime-application-x-smarttech-galleryitem.png\n 128x128/apps/SMART_Orient.png\n 128x128/apps/SMART_Notebook.png\n 128x128/apps/SMART_Pointer.png\n 128x128/apps/SMART_Keyboard.png\n 128x128/apps/SMART_ScreenCapture.png\n 128x128/apps/SMART_ControlPanel.png\n 128x128/apps/SMART_ScreenShade.png\n 128x128/apps/SMART_Spotlight.png\n 128x128/apps/SMART_Magnifier.png\n 16x16/mimetypes/application-x-smarttech-galleryitem.png\n 16x16/mimetypes/application-x-smarttech-gallery.png\n 16x16/mimetypes/gnome-mime-application-x-smarttech-notebook.png\n 16x16/mimetypes/gnome-mime-application-x-smarttech-gallery.png\n 16x16/mimetypes/application-x-smarttech-notebook.png\n 16x16/mimetypes/gnome-mime-application-x-smarttech-galleryitem.png\n 16x16/apps/SMART_Orient.png\n 16x16/apps/SMART_Notebook.png\n 16x16/apps/SMART_Pointer.png\n 16x16/apps/SMART_Keyboard.png\n 16x16/apps/SMART_ScreenCapture.png\n 16x16/apps/SMART_ControlPanel.png\n 16x16/apps/SMART_ScreenShade.png\n 16x16/apps/SMART_Spotlight.png\n 16x16/apps/SMART_Magnifier.png\n 22x22/mimetypes/application-x-smarttech-galleryitem.png\n 22x22/mimetypes/application-x-smarttech-gallery.png\n 22x22/mimetypes/gnome-mime-application-x-smarttech-notebook.png\n 22x22/mimetypes/gnome-mime-application-x-smarttech-gallery.png\n 22x22/mimetypes/application-x-smarttech-notebook.png\n 22x22/mimetypes/gnome-mime-application-x-smarttech-galleryitem.png\n 22x22/apps/SMART_Orient.png\n 22x22/apps/SMART_Notebook.png\n 22x22/apps/SMART_Pointer.png\n 22x22/apps/SMART_Keyboard.png\n 22x22/apps/SMART_ScreenCapture.png\n 22x22/apps/SMART_ControlPanel.png\n 22x22/apps/SMART_ScreenShade.png\n 22x22/apps/SMART_Spotlight.png\n 22x22/apps/SMART_Magnifier.png\n 32x32/mimetypes/application-x-smarttech-galleryitem.png\n 32x32/mimetypes/application-x-smarttech-gallery.png\n 32x32/mimetypes/gnome-mime-application-x-smarttech-notebook.png\n 32x32/mimetypes/gnome-mime-application-x-smarttech-gallery.png\n 32x32/mimetypes/application-x-smarttech-notebook.png\n 32x32/mimetypes/gnome-mime-application-x-smarttech-galleryitem.png\n 32x32/apps/SMART_Orient.png\n 32x32/apps/SMART_Notebook.png\n 32x32/apps/SMART_Pointer.png\n 32x32/apps/SMART_Keyboard.png\n 32x32/apps/SMART_ScreenCapture.png\n 32x32/apps/SMART_ControlPanel.png\n 32x32/apps/SMART_ScreenShade.png\n 32x32/apps/SMART_Spotlight.png\n 32x32/apps/SMART_Magnifier.png\n 48x48/mimetypes/application-x-smarttech-galleryitem.png\n 48x48/mimetypes/application-x-smarttech-gallery.png\n 48x48/mimetypes/gnome-mime-application-x-smarttech-notebook.png\n 48x48/mimetypes/gnome-mime-application-x-smarttech-gallery.png\n 48x48/mimetypes/application-x-smarttech-notebook.png\n 48x48/mimetypes/gnome-mime-application-x-smarttech-galleryitem.png\n 48x48/apps/SMART_Orient.png\n 48x48/apps/SMART_Notebook.png\n 48x48/apps/SMART_Pointer.png\n 48x48/apps/SMART_Keyboard.png\n 48x48/apps/SMART_ScreenCapture.png\n 48x48/apps/SMART_ControlPanel.png\n 48x48/apps/SMART_ScreenShade.png\n 48x48/apps/SMART_Spotlight.png\n 48x48/apps/SMART_Magnifier.png\n 22x22/apps/SMART_ProductUpdate.png\n 22x22/apps/SMART_Tools.png\n 22x22/apps/SMART_Board_Software.png\n 48x48/apps/SMART_ProductUpdate.png\n 48x48/apps/SMART_Tools.png\n 48x48/apps/SMART_Board_Software.png\n 128x128/apps/SMART_ProductUpdate.png\n 128x128/apps/SMART_Tools.png\n 128x128/apps/SMART_Board_Software.png\n 32x32/apps/SMART_ProductUpdate.png\n 32x32/apps/SMART_Tools.png\n 32x32/apps/SMART_Board_Software.png\n 16x16/apps/SMART_ProductUpdate.png\n 16x16/apps/SMART_Tools.png\n 16x16/apps/SMART_Board_Software.png\n 22x22/apps/SMART_LanguageChooser.png\n 48x48/apps/SMART_LanguageChooser.png\n 128x128/apps/SMART_LanguageChooser.png\n 32x32/apps/SMART_LanguageChooser.png\n scalable/apps/SMART_LanguageChooser.svg\n 16x16/apps/SMART_LanguageChooser.png " case "$1" in configure) if [ -d "$SMARTBOARD_CHROOT" ]; then cd /usr/share/itzks-systems-smartboard find * -type f | while read path; do ln -fs /usr/share/itzks-systems-smartboard/$path /usr/share/$path done cd - 1>/dev/null printf "$ICON_SYMLINKS" | while read rel_icon_path; do chroot_icon_path="$SMARTBOARD_CHROOT/usr/share/icons/hicolor/$rel_icon_path" system_icon_path="/usr/share/icons/hicolor/$rel_icon_path" if [ -f "$chroot_icon_path" ]; then ln -sf "$chroot_icon_path" "$system_icon_path" fi done update-icon-caches /usr/share/icons/hicolor update-desktop-database update-mime-database /usr/share/mime fi # setup itzks-smartboard group if ! getent group itzks-smartboard 1>/dev/null 2>/dev/null; then echo "Creating itzks-smartboard group." 1>&2 addgroup --system itzks-smartboard else echo "Group itzks-smartboard already exists." 1>&2 fi if [ -d /usr/share/doc/debian-edu-config ] && [ ! -d /skole ]; then mkdir -p /skole fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" 1>&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0