#!/usr/bin/env bash
# run specified command for all LLVM packages, in bump order
# (c) 2022-2024 Michał Górny <mgorny@gentoo.org>
# SPDX-License-Identifier: GPL-2.0-or-later

cd "$(git rev-parse --show-toplevel)" || exit 1

readarray -t packages < metadata/stabilization-groups/llvm.group

for pkg in "${packages[@]}"; do
	[[ ${pkg} == '#'* ]] && continue
	(
		cd "${pkg}" &&
		"${@}"
	)
done
