File: python-libsvm.preinst

package info (click to toggle)
libsvm 3.12-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 1,692 kB
  • ctags: 1,007
  • sloc: cpp: 3,942; java: 3,593; ansic: 2,094; python: 910; makefile: 155; sh: 37
file content (29 lines) | stat: -rw-r--r-- 836 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
set -e

PYCENTRAL=/usr/bin/pycentral

if [ "$1" = upgrade ]
then
       if dpkg --compare-versions "$2" lt 0.17.4-2 ; then
	   if [ -x $PYCENTRAL ]; then
               pycentral pkgremove python-libsvm
	   fi
       fi  
       for pyversion in 2.4 2.5 2.6; do
           if [ -f /usr/lib/python$pyversion/site-packages/svmc.so ]; then
               rm -f /usr/lib/python$pyversion/site-packages/svmc.so
           fi
		   if [ -f /usr/share/pyshared/svm.py ]; then
			   rm -f /usr/share/pyshared/svm.py
		   fi
		   if [ -f /usr/lib/pyshared/python$pyversion/svmc.so ]; then
			   rm -f /usr/lib/pyshared/python$pyversion/svmc.so
		   fi
           if [ -f /usr/lib/python$pyversion/site-packages/svm.py ]; then
               rm -f /usr/lib/python$pyversion/site-packages/svm.py
           fi
       done
fi

#DEBHELPER#