home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / ghostscript.preinst < prev    next >
Encoding:
Text File  |  2012-12-27  |  905 b   |  39 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. case "$1" in
  6.     install|upgrade)
  7.     # Do away with update-alternative for /usr/bin/gs, we have one
  8.     # grand unified Ghostscript now!
  9.     if dpkg --compare-versions "$2" lt-nl "8.63.dfsg.1-1"; then
  10.         update-alternatives --remove-all gs || true
  11.         update-alternatives --remove-all gs.1 || true
  12.     fi
  13.  
  14.     # Do away with update-alternative for /usr/bin/ps2pdf, upstream
  15.     # provides it as a script
  16.         if dpkg --compare-versions "$2" lt-nl "8.64~dfsg-1"; then
  17.         update-alternatives --remove-all ps2pdf || true
  18.     fi
  19.  
  20.     # Remove obsolete defoma files
  21.     if dpkg --compare-versions "$2" lt-nl "8.71~dfsg2-1"; then
  22.       rm -rf /var/lib/defoma/gs.d
  23.       rm -f /etc/defoma/ghostscript.subst-rule
  24.       rm -f /etc/defoma/ghostscript.subst-rule~
  25.       rm -f /var/lib/defoma/ghostscript.subst-cache
  26.     fi
  27.     ;;
  28.     abort-upgrade)
  29.     ;;
  30.     *)
  31.     echo "preinst called with unknown argument \`$1'" >&2
  32.     exit 1
  33.     ;;
  34. esac
  35.  
  36.  
  37.  
  38. exit 0
  39.