Skip to content

Commit

Permalink
Adjust "versions.sh" and "apply-templates.sh" to have a bit of helpfu…
Browse files Browse the repository at this point in the history
…l output (better matching other repositories)
  • Loading branch information
tianon committed Dec 10, 2021
1 parent bfa3f8f commit b8550eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apply-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,21 @@ for version; do
dist="$(dirname "$version")"
export codename dist version

rm -rf "$version/"

variants="$(jq -r '.[env.version].variants | map(@sh) | join(" ")' versions.json)"
eval "variants=( $variants )"

for variant in "${variants[@]}"; do
template="Dockerfile${variant:+-$variant}.template"
target="$version${variant:+/$variant}/Dockerfile"
dir="$version${variant:+/$variant}"
mkdir -p "$dir"

echo "processing $dir ..."

{
generated_warning
gawk -f "$jqt" "$template"
} > "$target"
} > "$dir/Dockerfile"
done
done
3 changes: 3 additions & 0 deletions versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ for version in "${distsSuites[@]}"; do
if [ -n "$suite" ]; then
export suite
doc="$(jq <<<"$doc" -c '.suite = env.suite')"
echo "$version: $suite"
else
echo "$version: ???"
fi
export doc version
json="$(jq <<<"$json" -c --argjson doc "$doc" '.[env.version] = $doc')"
Expand Down

0 comments on commit b8550eb

Please sign in to comment.