diff options
Diffstat (limited to 'source4/heimdal_build/et_compile_wrapper.sh')
-rwxr-xr-x | source4/heimdal_build/et_compile_wrapper.sh | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source4/heimdal_build/et_compile_wrapper.sh b/source4/heimdal_build/et_compile_wrapper.sh index b267bb5ddc..939b434767 100755 --- a/source4/heimdal_build/et_compile_wrapper.sh +++ b/source4/heimdal_build/et_compile_wrapper.sh @@ -1,13 +1,13 @@ #!/bin/sh # -SELF=$0 -SELFDIR=`dirname ${SELF}` +SELF="$0" +SELFDIR=`dirname "${SELF}"` -DESTDIR=$1 -CMD=$2 -FILE=$3 -SOURCE=$4 +DESTDIR="$1" +CMD="$2" +FILE="$3" +SOURCE="$4" shift 4 test -z "${DESTDIR}" && { @@ -30,22 +30,22 @@ test -z "${SOURCE}" && { exit 1; } -CURDIR=`pwd` +CURDIR="`pwd`" -cd ${DESTDIR} && { +cd "${DESTDIR}" && { # Remove older copies beforehand - MIT's compile_et uses odd permissions for these # files, which makes Heimdal's compile_et fail mysteriously when writing to them. - rm -f `basename ${FILE} .et`.c - rm -f `basename ${FILE} .et`.h - ${CMD} ${FILE} >&2 || exit 1; - cd ${CURDIR} + rm -f `basename "${FILE}" .et`.c + rm -f `basename "${FILE}" .et`.h + "${CMD}" "${FILE}" >&2 || exit 1; + cd "${CURDIR}" TMP="${SOURCE}.$$" - mv ${SOURCE} ${TMP} && { - echo "#include \"config.h\"" > ${SOURCE} && { - cat ${TMP} >> ${SOURCE} + mv "${SOURCE}" "${TMP}" && { + echo "#include \"config.h\"" > "${SOURCE}" && { + cat "${TMP}" >> "${SOURCE}" } } - rm -f ${TMP} + rm -f "${TMP}" } || { echo "${SELF}:cannot cd into '${DESTDIR}'" >&2; exit 1; |