substitute 721 Bytes
Newer Older
1
#!/bin/bash
2 3 4 5 6 7
#########################################################
# 							#
# This is BashStyle-NG  				#
#							#
# Licensed under GNU GENERAL PUBLIC LICENSE v3    	#
#							#
8
# Copyright 2007 - 2017 Christopher Bratusek		#
9 10
#							#
#########################################################
11

12
IN_FILES=( rc/bashstyle-rc data/bashstyle data/bashstyle-config-helper data/bashstyle-ng.pc )
13 14 15

copy_in_files () {

16
	for in_file in "${IN_FILES[@]}"; do
17
		cp "${in_file}".in "${in_file}";
18 19 20 21 22 23
	done

}

substitute_values () {

24 25 26
	sed -e "s>@VERSION@>${APP_VERSION}>g" \
		-e "s>@PREFIX@>${PREFIX}>g" \
		-e "s>@DATADIR@>${DATADIR}>g" \
27 28
		-e "s>@PYTHON@>${PYTHON}>g" -i "${IN_FILES[@]}"
	sed -e "s>//>/>g" -i "${IN_FILES[@]}"
29 30

}