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