mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 19:07:54 +01:00
generalize search
This commit is contained in:
parent
c6ca69ed25
commit
aa022dfd44
4 changed files with 47 additions and 20 deletions
|
|
@ -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"
|
||||
|
|
|
|||
31
tests/iso/verify_flatpakrepo_updated.sh
Normal file
31
tests/iso/verify_flatpakrepo_updated.sh
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
add_line=$(grep flatpak_manager.add_remote /mnt/install/usr/lib64/python3.12/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"
|
||||
result=1
|
||||
fi
|
||||
|
||||
if [ -z "${add_line_url}" ]
|
||||
then
|
||||
echo "Repo url not updated"
|
||||
result=1
|
||||
fi
|
||||
|
||||
replace_line=$(grep flatpak_manager.replace_installed_refs_remote /mnt/install/usr/lib64/python3.12/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 in second line"
|
||||
result=1
|
||||
fi
|
||||
|
||||
exit ${result}
|
||||
Loading…
Add table
Add a link
Reference in a new issue