#!/bin/bash

IN_FILES=( rc/nx-rc data/bashstyle data/bashstyle-ng.pc data/bashstyle.sh )

SUB_VERSION_FILES=( data/bashstyle-ng.pc rc/nx-rc )
SUB_PREFIX_FILES=( data/bashstyle-ng.pc data/bashstyle data/bashstyle.sh rc/nx-rc )

copy_in_files () {

	for in_file in ${IN_FILES[@]}; do
		cp "${in_file}".in "${in_file}";
	done

}

substitute_values () {

	# substitute VERSION
	sed -e "s>@VERSION@>$xVERSION>g" -i ${SUB_VERSION_FILES[@]}

	# substitute PREFIX
	sed -e "s>@PREFIX@>$PREFIX>g" -i ${SUB_PREFIX_FILES[@]}

	# substitute DIRINFO_ENABLE
	sed -e "s>@DIRINFO_ENABLE@>$DIRINFO_ENABLE>g" -i data/bashstyle.sh

}
