#! /bin/sh ## $Id: fixconfig.in 8471 2009-05-17 08:25:35Z iulius $ ## ## Make variable substitutions in configuration files. ## ## This script does something very similar to what config.status does, but ## it fully resolves the various path variables (prefix, exec_prefix, etc.) ## so that they don't contain any variable substitutions. It's easier to ## do this in a separate script than try to use eval or the like to resolve ## the variable names inside configure, particularly since prefix and ## exec_prefix aren't set until the end of the script. # The paths set by configure. address@hidden@ address@hidden@ address@hidden@ address@hidden@ address@hidden@ address@hidden@ address@hidden@ # Additional paths specific to INN. address@hidden@ address@hidden@ address@hidden@ address@hidden@ address@hidden@ address@hidden@ address@hidden@ address@hidden@ address@hidden@ # Additional variables that are substituted into configuration files. address@hidden@ address@hidden@ address@hidden@ # We can probably just assume sed is on the path, but since we have it, we may # as well use it. address@hidden@ input="$1" if [ -z "$input" ] ; then echo "No input file specified" >&2 exit 1 fi output="$2" if [ -z "$output" ] ; then output=`echo "$input" | $SED -e 's/\.in$//'` fi if [ x"$input" = x"$output" ] ; then echo "No output file specified and input file doesn't end in .in" >&2 exit 1 fi $SED -e "s,@address@hidden,$prefix,g" \ -e "s,@address@hidden,$bindir,g" \ -e "s,@address@hidden,$libexecdir,g" \ -e "s,@address@hidden,$libdir,g" \ -e "s,@address@hidden,$sbindir,g" \ -e "s,@address@hidden,$sysconfdir,g" \ -e "s,@address@hidden,$CONTROLDIR,g" \ -e "s,@address@hidden,$DBDIR,g" \ -e "s,@address@hidden,$FILTERDIR,g" \ -e "s,@address@hidden,$HTTPDIR,g" \ -e "s,@address@hidden,$LIBPERLDIR,g" \ -e "s,@address@hidden,$LOGDIR,g" \ -e "s,@address@hidden,$RUNDIR,g" \ -e "s,@address@hidden,$SPOOLDIR,g" \ -e "s,@address@hidden,$tmpdir,g" \ -e "s,@address@hidden,$DO_PGPVERIFY,g" \ -e "s,@address@hidden,$HOSTNAME,g" \ -e "s,@address@hidden,$SENDMAIL,g" < "$input" > "$output"