debian-forge-cli/tools/rpm_spec_add_provides_bundle.sh
Simon de Vlieger 6061960689 spec: rename to image-builder
`image-builder` will be the main entrypoint into the Image Builder
stack. We will rename the repositories later on; but let's start
referring to it in its new official name.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 13:32:25 +00:00

13 lines
419 B
Bash
Executable file

#!/usr/bin/bash
SPEC_FILE=${1:-"image-builder.spec"}
# Save the list of bundled packages into a file
WORKDIR=$(mktemp -d)
BUNDLES_FILE=${WORKDIR}/bundles.txt
./tools/rpm_spec_vendor2provides vendor/modules.txt > "${BUNDLES_FILE}"
# Remove the current bundle lines
sed -i '/^# BUNDLE_START/,/^# BUNDLE_END/{//p;d;}' "${SPEC_FILE}"
# Add the new bundle lines
sed -i "/^# BUNDLE_START/r ${BUNDLES_FILE}" "${SPEC_FILE}"