~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to source4/heimdal_build/asn1_compile_wrapper.sh

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
 
 
4
SELF=$0
 
5
SELFDIR=`dirname ${SELF}`
 
6
 
 
7
BUILDDIR=$1
 
8
DESTDIR=$2
 
9
 
 
10
CMD=$3
 
11
FILE=$4
 
12
NAME=$5
 
13
shift 5
 
14
OPTIONS="$@"
 
15
 
 
16
test -z "${BUILDDIR}" && {
 
17
        echo "${SELF}:BUILDDIR: '${BUILDDIR}'" >&2;
 
18
        exit 1;
 
19
}
 
20
 
 
21
test -z "${DESTDIR}" && {
 
22
        echo "${SELF}:DESTDIR: '${DESTDIR}'" >&2;
 
23
        exit 1;
 
24
}
 
25
 
 
26
test -z "${CMD}" && {
 
27
        echo "${SELF}:CMD: '${CMD}'" >&2;
 
28
        exit 1;
 
29
}
 
30
 
 
31
test -z "${FILE}" && {
 
32
        echo "${SELF}:FILE: '${FILE}'" >&2;
 
33
        exit 1;
 
34
}
 
35
 
 
36
test -z "${NAME}" && {
 
37
        echo "${SELF}:NAME: '${NAME}'" >&2;
 
38
        exit 1;
 
39
}
 
40
 
 
41
CURDIR=`pwd`
 
42
 
 
43
cd ${BUILDDIR} && {
 
44
        ABS_BUILDDIR=`pwd`
 
45
        cd ${CURDIR}
 
46
} || {
 
47
        echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
 
48
        exit 1;
 
49
}
 
50
 
 
51
cd ${DESTDIR} && {
 
52
        ${ABS_BUILDDIR}/${CMD} ${OPTIONS} ${FILE} ${NAME} >&2 || exit 1;
 
53
        cd ${CURDIR}
 
54
} || {
 
55
        echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
 
56
        exit 1;
 
57
}
 
58
 
 
59
exit 0;