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 / python-gst0.10.prerm < prev    next >
Encoding:
Text File  |  2007-03-20  |  1.1 KB  |  51 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. PYTHON_DEFAULT=$(pyversions --default)
  6.  
  7. this="python-gst0.10"
  8.  
  9. pc_files() {
  10.     runtime="$1"
  11.  
  12.     dpkg -L "$this" | sed -n -e "s#^/usr/lib/pkgconfig/$runtime/##p"
  13. }
  14.  
  15. if [ "$1" = "remove" ]; then
  16.     cd /usr/lib/pkgconfig
  17.  
  18.     for f in $(pc_files $PYTHON_DEFAULT); do
  19.         rm -f "$f"
  20.     done
  21. fi
  22.  
  23. # Automatically added by dh_pycentral
  24. if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then
  25.     pycentral pkgremove python-gst0.10
  26. else
  27.     flist=$(tempfile)
  28.     find /usr/share/pycentral/python-gst0.10 -depth -mindepth 2 \
  29.       \( -name '*.py' -printf 'p %P\n' -o -printf '%y %P\n' \) \
  30.       > $flist 2>/dev/null || true
  31.     if [ -s $flist ]; then
  32.         for d in /usr/lib/python[0-9].[0-9]; do
  33.         case "$d" in */python2.1|*/python2.2) continue; esac
  34.         while read t n; do
  35.             case "$t" in
  36.             p) rm -f $d/$n $d/${n}[co];;
  37.             d) rmdir $d/$n 2>/dev/null || true;;
  38.             *) rm -f $d/$n
  39.             esac
  40.         done < $flist
  41.         done
  42.     fi
  43.     rm -f $flist
  44.     dpkg -L python-gst0.10 \
  45.             | awk '/\/usr\/share\/pycentral/ {next} /\.py$/ {print $0"c\n" $0"o"}' \
  46.         | xargs rm -f >&2
  47. fi
  48. # End automatically added section
  49.  
  50.  
  51.