From 7f666f66492e32cb4d46d2f26c20ccc31d6b45f5 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio <23226432+hyperreal64@users.noreply.github.com> Date: Wed, 28 Feb 2024 18:45:03 -0600 Subject: [PATCH] Use Bash heredoc for charm.repo --- ostree-engine | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ostree-engine b/ostree-engine index 6a04f0a..7751628 100755 --- a/ostree-engine +++ b/ostree-engine @@ -22,12 +22,14 @@ fi # Ensure gum is installed if ! test -x "$(command -v gum)"; then - echo '[charm] - name=Charm - baseurl=https://repo.charm.sh/yum/ - enabled=1 - gpgcheck=1 - gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo + cat < /etc/yum.repos.d/charm.repo +[charm] +name=Charm +baseurl=https://repo.charm.sh/yum/ +enabled=1 +gpgcheck=1 +gpgkey=https://repo.charm.sh/yum/gpg.key +EOF dnf install -y gum fi @@ -104,7 +106,7 @@ fi # Compose ostree base image and push to registry log_struc_info "Compose ostree base image and push to registry" treefile "${TREEFILE}" registry "${REGISTRY}" -if ! rpm-ostree compose image --cachedir "${CACHE_DIR}" -i --initialize-mode=if-not-exists --format=registry "${TREEFILE}" "${REGISTRY}/fedora-atomic/vauxite-build/vauxite:${RELVER}"; then +if ! rpm-ostree compose image --cachedir "${CACHE_DIR}" --initialize-mode=if-not-exists --format=registry "${TREEFILE}" "${REGISTRY}/fedora-atomic/vauxite-build/vauxite:${RELVER}"; then log_struc_error "Error composing ostree and/or pushing to registry" status "$?" exit 1 fi