~ubuntu-branches/ubuntu/karmic/cyrus-imapd-2.2/karmic

« back to all changes in this revision

Viewing changes to debian/patches/98-use_Debian_config.guess_config.sub.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-07-11 18:51:39 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060711185139-gl3oe4tppp7g3euf
Tags: 2.2.13-4ubuntu1
Synchronize with Debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
## 98_use_Debian_config.guess_config.sub.dpatch by Sven Mueller <debian@incase.de>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: Update config.sub and config.guess from the autotools-dev package
6
 
set -e
7
 
 
8
 
case "$1" in
9
 
        "-patch")
10
 
                if [ ! -f /usr/share/misc/config.sub ] || [ ! -f /usr/share/misc/config.guess ] ; then
11
 
                        echo "config.sub and/or config.guess not found - are autotools-dev really installed?" >&2
12
 
                        exit 1
13
 
                fi
14
 
                if [ -f config.guess ] && [ ! -f config.guess.dpatch ]; then
15
 
                        # only move it if the destination doesn't already exist.
16
 
                        # after all, our backup should really be the copy from
17
 
                        # the orig.tar.gz
18
 
                        mv config.guess config.guess.dpatch || exit 1
19
 
                fi
20
 
                if [ -f config.sub ] && [ ! -f config.sub.dpatch ]; then
21
 
                        mv config.sub config.sub.dpatch || exit 1
22
 
                fi
23
 
                cp -f /usr/share/misc/config.guess config.guess || exit 1
24
 
                cp -f /usr/share/misc/config.sub config.sub || exit 1
25
 
                exit 0
26
 
                ;;
27
 
        "-unpatch")
28
 
                if [ -f config.guess.dpatch ]; then
29
 
                        mv -f config.guess.dpatch config.guess || exit 1
30
 
                fi
31
 
                if [ -f config.sub.dpatch ]; then
32
 
                        mv -f config.sub.dpatch config.sub || exit 1
33
 
                fi
34
 
                exit 0
35
 
                ;;
36
 
        *)
37
 
                echo "unknown dpatch command: $1" >&2
38
 
                exit 1
39
 
                ;;
40
 
esac
41
 
exit 0
42
 
                
43