1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00

Add flatpaks (#32)

This commit is contained in:
Jason N 2024-03-10 23:39:22 -04:00 committed by GitHub
parent 54d89036fb
commit bfa150ceeb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 169 additions and 49 deletions

View file

@ -1,24 +1,7 @@
#!/bin/bash
iso=$1
sudo apt-get update
sudo apt-get install -y squashfs-tools
sudo mkdir /mnt/{iso,install}
# Mount ISO
sudo mount -o loop $iso /mnt/iso
# Mount squashfs
sudo mount -t squashfs -o loop /mnt/iso/images/install.img /mnt/install
FOUND_VERSION=$(cat /mnt/install/etc/os-release | grep VERSION_ID | cut -d= -f2)
# Cleanup
sudo umount /mnt/install
sudo umount /mnt/iso
if [[ ${FOUND_VERSION} != ${VERSION} ]]
then
echo "Version mismatch"

View file

@ -0,0 +1,37 @@
#!/bin/bash
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"
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"
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"
result=1
else
echo "Repo name found on replace_installed_refs line"
fi
exit ${result}