#!/bin/bash
#########################################################
# 							#
# This is BashStyle-NG  				#
#							#
# Licensed under GNU GENERAL PUBLIC LICENSE v3    	#
#							#
# Copyright 2007 - 2017 Christopher Bratusek		#
#							#
#########################################################

IN_FILES=( rc/bashstyle-rc data/bashstyle data/bashstyle-config-helper data/bashstyle-ng.pc )

copy_in_files () {

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

}

substitute_values () {

	sed -e "s>@VERSION@>${APP_VERSION}>g" \
		-e "s>@PREFIX@>${PREFIX}>g" \
		-e "s>@DATADIR@>${DATADIR}>g" \
		-e "s>@PYTHON@>${PYTHON}>g" -i "${IN_FILES[@]}"
	sed -e "s>//>/>g" -i "${IN_FILES[@]}"

}
