#! /bin/sh
+# Copyright (c) The Exim Maintainters 2022
+# SPDX-License-Identifier: GPL-2.0-or-later
+
# Script to install Exim binaries in BIN_DIRECTORY, which is defined in
# the local Makefile. It expects to be run in a build directory. It needs
# to be run as root in order to make exim setuid to root. If exim runs setuid
# The exim binary is handled specially
if [ $name = exim${EXE} ]; then
- version=exim-`./exim -bV -C /dev/null | \
+ exim="./exim -bV -C /dev/null"
+ version=exim-`$exim 2>/dev/null | \
awk '/Exim version/ { OFS=""; print $3,"-",substr($4,2,length($4)-1) }'`${EXE}
if [ "${version}" = "exim-${EXE}" ]; then
echo $com ""
- echo $com "*** Could not run ./exim to find version number ***"
+ echo $com "*** Could not run $exim to find version number ***"
echo $com "*** Exim installation ${ver}failed ***"
+ $exim
exit 1
fi