home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / deskbar-applet.prerm < prev    next >
Encoding:
Text File  |  2007-04-09  |  997 b   |  34 lines

  1. #!/bin/sh
  2. set -e
  3. # Automatically added by dh_gconf
  4. if [ "$1" = remove ] || [ "$1" = upgrade ]; then
  5.     gconf-schemas --unregister deskbar-applet.schemas 
  6. fi
  7. # End automatically added section
  8. # Automatically added by dh_pycentral
  9. if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then
  10.     pycentral pkgremove deskbar-applet
  11. else
  12.     flist=$(tempfile)
  13.     find /usr/share/pycentral/deskbar-applet -depth -mindepth 2 \
  14.       \( -name '*.py' -printf 'p %P\n' -o -printf '%y %P\n' \) \
  15.       > $flist 2>/dev/null || true
  16.     if [ -s $flist ]; then
  17.         for d in /usr/lib/python[0-9].[0-9]; do
  18.         case "$d" in */python2.1|*/python2.2) continue; esac
  19.         while read t n; do
  20.             case "$t" in
  21.             p) rm -f $d/$n $d/${n}[co];;
  22.             d) rmdir $d/$n 2>/dev/null || true;;
  23.             *) rm -f $d/$n
  24.             esac
  25.         done < $flist
  26.         done
  27.     fi
  28.     rm -f $flist
  29.     dpkg -L deskbar-applet \
  30.             | awk '/\/usr\/share\/pycentral/ {next} /\.py$/ {print $0"c\n" $0"o"}' \
  31.         | xargs rm -f >&2
  32. fi
  33. # End automatically added section
  34.