#!/bin/sh # build_script # # This shell file builds out the start script file based on the # specified template and config file TEMPLATE=$1 CONFIG=$2 if [ -z "$TEMPLATE" ]; then \ echo "Error - you didn't specify a template file" exit 1 fi if [ -z "$CONFIG" ]; then \ echo "Error - you didn't specify a config file" exit 1 fi # Source the config file . $CONFIG # Now, actually replace the settings in the file cat $TEMPLATE | \ sed -e s%@prefix@%$PREFIX%g | \ sed -e s%@installdir@%$INSTALL_DIR%g | \ sed -e s%@mwdir@%$MWDIR%g | \ sed -e s%@fltkdir@%$FLTKDIR%g