~ubuntu-branches/ubuntu/trusty/sysprof/trusty

« back to all changes in this revision

Viewing changes to debian/sysprof-module-dkms.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Ritesh Raj Sarraf
  • Date: 2011-02-10 20:19:07 UTC
  • mfrom: (8.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20110210201907-p26543mzu74d9f89
Tags: 1.0.12-4
Upload to unstable 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
set -e
 
4
 
 
5
package=sysprof-module-dkms
 
6
name=sysprof-module
 
7
 
 
8
version=`dpkg-query -W -f='${Version}' "$package" \
 
9
        |rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n"`
 
10
 
 
11
isadded=`dkms status -m "$name" -v "$version"`
 
12
 
 
13
if [ "x${isadded}" = "x" ] ; then
 
14
        dkms add -m "$name" -v "$version"
 
15
fi
 
16
 
 
17
if [ "$1" = 'configure' ] ; then
 
18
        dkms build -m "$name" -v "$version" && dkms install -m "$name" -v "$version" || true
 
19
fi
 
20
 
 
21
#DEBHELPER#
 
22
 
 
23
exit 0
 
24