r24651: Allow dynamic updates for the domain controller over its own name
[Samba/aatanasov.git] / source4 / heimdal_build / asn1_compile_wrapper.sh
blob96677c7e8e659dbc233c73ad3a61b75c830c6276
1 #!/bin/sh
4 SELF=$0
5 SELFDIR=`dirname ${SELF}`
7 SRCDIR=$1
8 BUILDDIR=$2
9 DESTDIR=$3
11 CMD=$4
12 FILE=$5
13 NAME=$6
14 shift 6
15 OPTIONS="$@"
17 test -z "${SRCDIR}" && {
18 echo "${SELF}:SRCDIR: '${SRCDIR}'" >&2;
19 exit 1;
22 test -z "${BUILDDIR}" && {
23 echo "${SELF}:BUILDDIR: '${BUILDDIR}'" >&2;
24 exit 1;
27 test -z "${DESTDIR}" && {
28 echo "${SELF}:DESTDIR: '${DESTDIR}'" >&2;
29 exit 1;
32 test -z "${CMD}" && {
33 echo "${SELF}:CMD: '${CMD}'" >&2;
34 exit 1;
37 test -z "${FILE}" && {
38 echo "${SELF}:FILE: '${FILE}'" >&2;
39 exit 1;
42 test -z "${NAME}" && {
43 echo "${SELF}:NAME: '${NAME}'" >&2;
44 exit 1;
47 CURDIR=`pwd`
49 cd ${SRCDIR} && {
50 ABS_SRCDIR=`pwd`
51 cd ${CURDIR}
52 } || {
53 echo "${SELF}:cannot cd into '${SRCDIR}'" >&2;
54 exit 1;
57 cd ${BUILDDIR} && {
58 ABS_BUILDDIR=`pwd`
59 cd ${CURDIR}
60 } || {
61 echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
62 exit 1;
65 cd ${DESTDIR} && {
66 ${ABS_BUILDDIR}/${CMD} ${OPTIONS} ${ABS_SRCDIR}/${FILE} ${NAME} >&2 || exit 1;
67 cd ${CURDIR}
68 } || {
69 echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
70 exit 1;
73 exit 0;