Commit 42079117 authored by gsell's avatar gsell

bin/manage_variants

- reviewed
parent 9aa15165
...@@ -6,11 +6,23 @@ declare variants=$2 ...@@ -6,11 +6,23 @@ declare variants=$2
declare -r OS=$(uname -s) declare -r OS=$(uname -s)
while read versions release oss dependencies; do # File format example
[[ "${oss}" =~ "${OS}" ]] || continue # 1.10.2 Linux,Darwin unstable gcc/4.8.5
versions_a=( ${versions//,/ } ) declare -a toks=()
dependencies_a=( ${dependencies//,/ } ) declare version=''
for version in "${versions_a[@]}"; do declare oss=''
"${buildblock}" "${version}" --release=${release} "${dependencies_a[@]/#/--with=}" declare release=''
done declare -a dependencies=()
done < "${variants}"
\ No newline at end of file while read -a toks; do
# skip comment and empty line
(( ${#toks[@]} == 0 )) && continue
[[ "${toks[0]:0:1}" == "#" ]] && continue
version=${toks[0]}
oss=${toks[1]}
release=${toks[2]}
dependencies=( ${toks[@]:3} )
[[ "${oss}" =~ "${OS}" ]] || continue
"${buildblock}" "${version}" --release=${release} "${dependencies[@]/#/--with=}"
done < "${variants}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment