From e048c8ff2df483a7576fdb5e859fba7eeacb66ed Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Jan 2017 00:31:44 +0300 Subject: Add support for environmenr variable envname. It set part of name for created environment file like this: env/run{$envname}.sh By default used package name. --- scripts/include/common.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/include/common.sh') diff --git a/scripts/include/common.sh b/scripts/include/common.sh index ae5c64c..e286f5d 100644 --- a/scripts/include/common.sh +++ b/scripts/include/common.sh @@ -14,6 +14,10 @@ function common_build_init { export installname=${package} fi + if [[ "${envname}" == "" ]]; then + export envname=${package} + fi + export srcdir=$(realpath "${dir}/../src/${package}") if [ ! -d "${srcdir}" ]; then echo "Error: Package sources directory not exists for package '${package}'." @@ -69,7 +73,7 @@ function common_run_package { function common_use_package { cd "${scriptsdir}" check_error $? - export envfile="../env/run${package}.sh" + export envfile="../env/run${envname}.sh" echo "#!/bin/bash" >"${envfile}" check_error $? echo "" >>"${envfile}" -- cgit v1.2.3-60-g2f50