while read src dst
do
    SO_BASEDIR=${SO_BASEDIR:-/opt}
    sed -e "s#@SO_BASEDIR@#$SO_BASEDIR#g" \
        $src > $dst || exit 2
done
exit 0
