File: python-libsvm.preinst

package info (click to toggle)
libsvm 3.21%2Bds-1.1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 864 kB
  • ctags: 1,108
  • sloc: cpp: 3,987; java: 3,666; ansic: 2,259; python: 1,051; makefile: 154; sh: 24
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#