File: postinst

package info (click to toggle)
dbishell 0.8.9-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 828 kB
  • ctags: 1,423
  • sloc: perl: 13,353; makefile: 138; sh: 15
file content (23 lines) | stat: -rw-r--r-- 690 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh -e
# dbishell postinst

if [ "$1" = "configure" ]; then

# Assume debconf is the way to go.
. /usr/share/debconf/confmodule

db_get dbishell/dbiwarning

echo "Checking for interesting perl DBI drivers..."

perl -MDBI       \
     -Mstrict    \
     -e 'my $bored  = q^* No Interesting DBD Drivers on this system, please install some *^;' \
     -e 'my $boring = q^(?:ADO|ExampleP|Multiplex|Proxy)$^;'                   \
     -e 'my @dbd = grep { !/$boring/o } DBI->available_drivers();'       \
     -e '$, = "\n";'                                                     \
     -e 'print(STDOUT ( @dbd ? ( "Interesting drivers installed:",@dbd) : ($bored) ), "");'

fi

#DEBHELPER#