1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00
build-container-installer/test/iso/flatpak_repo_updated.sh
2024-10-29 15:34:12 -04:00

54 lines
No EOL
1.5 KiB
Bash

#!/bin/bash
if [[ ${VERSION} -ge 41 ]]
then
result=0
grep "^[Payload]" mnt/install/etc/anaconda/conf.d/anaconda.conf > /dev/null || {
echo "Missing [Payload] header"
result=1
}
grep "^flatpak_remote = ${FLATPAK_REMOTE_NAME} ${_FLATPAK_REPO_URL}" mnt/install/etc/anaconda/conf.d/anaconda.conf > /dev/null || {
echo "Missing flatpak_remote option"
result=1
}
exit ${result}
fi
add_line=$(grep flatpak_manager.add_remote mnt/install/usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py)
add_line_repo=$(echo "${add_line}" | grep "${FLATPAK_REMOTE_NAME}")
add_line_url=$(echo "${add_line}" | grep "${_FLATPAK_REPO_URL}")
result=0
if [ -z "${add_line_repo}" ]
then
echo "Repo name not updated on add_remote line"
echo "${add_line}"
result=1
else
echo "Repo name found on add_remote line"
fi
if [ -z "${add_line_url}" ]
then
echo "Repo url not updated on add_remote line"
echo "${add_line}"
result=1
else
echo "Repo url found on add_remote line"
fi
replace_line=$(grep flatpak_manager.replace_installed_refs_remote mnt/install/usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py)
replace_line_repo=$(echo "${replace_line}" | grep "${FLATPAK_REMOTE_NAME}")
if [ -z "${replace_line_repo}" ]
then
echo "Repo name not updated on replace_installed_refs line"
echo "${replace_line}"
result=1
else
echo "Repo name found on replace_installed_refs line"
fi
exit ${result}