#!/bin/bash # # This tool generates a butane config file for the podman-quadlet-cookbook # project. The generated file can be used to provision a Fedora CoreOS # instance with all necessary quadlets and systemd units to run the # podman-quadlet-cookbook tests. # # It takes the following parameters: # - The target chroot directory where the quadlets and systemd units # have been installed. # - The list of systemd main unit names to enable. # # It outputs the butane config file to stdout. # set -Eeuo pipefail TARGET_CHROOT="$1" SYSTEMD_MAIN_UNIT_NAMES="${@:2}" cat <<"EOF" variant: fcos version: 1.4.0 storage: files: EOF for file in $(find "$TARGET_CHROOT" \! -type d); do rel_path="${file#$TARGET_CHROOT}" cat <