531
|
1 |
#!/bin/sh
|
579
|
2 |
# postrm script for canfestival
|
531
|
3 |
|
|
4 |
set -e
|
|
5 |
|
|
6 |
DLL_LIST=
|
579
|
7 |
CF_CONFIG_DIR=/usr/share/CanFestival-3/objdictgen/
|
531
|
8 |
CF_CONFIG=/usr/share/CanFestival-3/objdictgen/canfestival_config.py
|
|
9 |
CF_CONFIG_TEMP=/usr/share/CanFestival-3/objdictgen/canfestival_config_ori.py
|
|
10 |
|
|
11 |
case "$1" in
|
|
12 |
configure)
|
|
13 |
;;
|
|
14 |
|
579
|
15 |
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
|
16 |
|
|
17 |
if [ -d $CF_CONFIG_DIR ];then
|
|
18 |
ldconfig
|
|
19 |
# Find canfestival driver library in /usr/lib
|
|
20 |
cd /usr/lib
|
|
21 |
for file in `ls libcanfestival_can* 2>/dev/null`
|
|
22 |
do
|
|
23 |
DLL_LIST="'$file',""$DLL_LIST"
|
|
24 |
done
|
|
25 |
|
|
26 |
# copy template config and add the DLL_LIST
|
|
27 |
# do this to display available canfestival plugin list choice in beremiz
|
|
28 |
cat $CF_CONFIG_TEMP > $CF_CONFIG
|
|
29 |
echo "DLL_LIST=[$DLL_LIST]" >> $CF_CONFIG
|
|
30 |
fi
|
531
|
31 |
;;
|
|
32 |
|
|
33 |
*)
|
579
|
34 |
echo "postrm called with unknown argument \`$1'" >&2
|
531
|
35 |
exit 1
|
|
36 |
;;
|
|
37 |
esac
|
|
38 |
|
|
39 |
# dh_installdeb will replace this with shell code automatically
|
|
40 |
# generated by other debhelper scripts.
|
|
41 |
|
|
42 |
#DEBHELPER#
|
|
43 |
|
|
44 |
exit 0
|
|
45 |
|
|
46 |
|