~ubuntu-branches/ubuntu/quantal/enigmail/quantal-security

« back to all changes in this revision

Viewing changes to build/autoconf/match-dir.sh

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2013-09-13 16:02:15 UTC
  • mfrom: (0.12.16)
  • Revision ID: package-import@ubuntu.com-20130913160215-u3g8nmwa0pdwagwc
Tags: 2:1.5.2-0ubuntu0.12.10.1
* New upstream release v1.5.2 for Thunderbird 24

* Build enigmail using a stripped down Thunderbird 17 build system, as it's
  now quite difficult to build the way we were doing previously, with the
  latest Firefox build system
* Add debian/patches/no_libxpcom.patch - Don't link against libxpcom, as it
  doesn't exist anymore (but exists in the build system)
* Add debian/patches/use_sdk.patch - Use the SDK version of xpt.py and
  friends
* Drop debian/patches/ipc-pipe_rename.diff (not needed anymore)
* Drop debian/patches/makefile_depth.diff (not needed anymore)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
#
3
 
# This Source Code Form is subject to the terms of the Mozilla Public
4
 
# License, v. 2.0. If a copy of the MPL was not distributed with this
5
 
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
 
 
7
 
#
8
 
# This script will match a dir with a set of dirs.
9
 
#
10
 
# Usage: match-dir.sh match [dir1 dir2 ... dirn]
11
 
#
12
 
# Send comments, improvements, bugs to ramiro@netscape.com
13
 
14
 
 
15
 
if [ -f Makefile ]; then
16
 
        MAKEFILE="Makefile"
17
 
else
18
 
        if [ -f Makefile.in ]; then
19
 
                MAKEFILE="Makefile.in"
20
 
        else
21
 
                echo
22
 
                echo "There ain't no 'Makefile' or 'Makefile.in' over here: $pwd, dude."
23
 
                echo
24
 
                exit 1
25
 
        fi
26
 
fi
27
 
 
28
 
# Use DEPTH in the Makefile.in to determine the depth
29
 
depth=`grep -w DEPTH ${MAKEFILE}  | grep "\.\." | awk -F"=" '{ print $2; }'`
30
 
cwd=`pwd`
31
 
 
32
 
# Determine the depth count
33
 
n=`echo $depth | tr '/' ' ' | wc -w`
34
 
 
35
 
cd $depth
36
 
objdir=`pwd`
37
 
 
38
 
path=`echo $cwd | sed "s|^${objdir}/||"`
39
 
 
40
 
match=$path
41
 
 
42
 
for i in $*
43
 
do
44
 
#       echo "Looking for $match in $i"
45
 
 
46
 
        echo $i | grep -q -x $match
47
 
 
48
 
        if [ $? -eq 0 ]
49
 
        then
50
 
                echo "1"
51
 
 
52
 
                exit 0
53
 
        fi
54
 
 
55
 
#       echo "Looking for $i in $match"
56
 
 
57
 
        echo $match | grep -q $i
58
 
 
59
 
        if [ $? -eq 0 ]
60
 
        then
61
 
                echo "1"
62
 
 
63
 
                exit 0
64
 
        fi
65
 
done
66
 
 
67
 
echo "0"
68
 
 
69
 
exit 0