Use Bash heredoc for charm.repo

This commit is contained in:
Jeffrey Serio 2024-02-28 18:45:03 -06:00
parent 0df8a00eb2
commit 7f666f6649

View File

@ -22,12 +22,14 @@ fi
# Ensure gum is installed # Ensure gum is installed
if ! test -x "$(command -v gum)"; then if ! test -x "$(command -v gum)"; then
echo '[charm] cat <<EOF > /etc/yum.repos.d/charm.repo
name=Charm [charm]
baseurl=https://repo.charm.sh/yum/ name=Charm
enabled=1 baseurl=https://repo.charm.sh/yum/
gpgcheck=1 enabled=1
gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo gpgcheck=1
gpgkey=https://repo.charm.sh/yum/gpg.key
EOF
dnf install -y gum dnf install -y gum
fi fi
@ -104,7 +106,7 @@ fi
# Compose ostree base image and push to registry # Compose ostree base image and push to registry
log_struc_info "Compose ostree base image and push to registry" treefile "${TREEFILE}" registry "${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 "$?" log_struc_error "Error composing ostree and/or pushing to registry" status "$?"
exit 1 exit 1
fi fi