~ubuntu-branches/ubuntu/precise/s2tc/precise

« back to all changes in this revision

Viewing changes to debian/multiarchify-scripts.sh

  • Committer: Package Import Robot
  • Author(s): Sebastian Reichel
  • Date: 2012-04-11 23:53:37 UTC
  • Revision ID: package-import@ubuntu.com-20120411235337-bgjs6oswnj3sf8hw
Tags: 0~git20110809-2
* insert multi-arch path in postinst/prerm scripts at
  build time (Closes: #668377)
* Add me to Uploaders

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
MULTIARCH=$(dpkg-architecture -qDEB_HOST_MULTIARCH)
 
4
 
 
5
case $1 in
 
6
apply)
 
7
        for FILE in debian/*.postinst debian/*prerm ; do
 
8
                echo "replacing #MULTIARCH# with $MULTIARCH in $FILE."
 
9
                sed --in-place=.before-multiarchify s/#MULTIARCH#/$MULTIARCH/g $FILE
 
10
        done
 
11
        ;;
 
12
revert)
 
13
        for FILE in debian/*.postinst debian/*prerm ; do
 
14
                if [ -e $FILE.before-multiarchify ]; then
 
15
                        echo "revert #MULTIARCH# replacement in $FILE"
 
16
                        mv $FILE.before-multiarchify $FILE
 
17
                fi
 
18
        done
 
19
        ;;
 
20
*)
 
21
        echo "usage: $0 <apply|revert>"
 
22
        ;;
 
23
esac