Created
February 17, 2025 13:48
-
-
Save joske/1c7461c9c634cce9c6e065795911d60e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -A mappings | |
mappings["bankstown"]="lv2-bankstown" | |
mappings["widevine"]="widevine-installer" | |
mappings["lzfse"]="lzfse-libs" | |
mappings["FEX-Emu"]="fex-emu" | |
mappings["fex-emu-rootfs-arch"]="fex-emu-rootfs-fedora" | |
mappings["linux-asahi"]="kernel-16k" | |
mappings["linux-asahi-headers"]="kernel-headers" | |
mappings["mesa"]="mesa-vulkan-drivers" | |
mappings["alsa-ucm-conf-asahi"]="alsa-ucm-asahi" | |
DB=asahi-alarm.db.tar.gz | |
wget -O $DB -q https://github.com/asahi-alarm/asahi-alarm/releases/download/aarch64/$DB | |
PKGS=$(tar tvf $DB | grep -v .sig | grep -v desc | awk '{ print $6}' | sed 's!/$!!g') | |
rm $DB | |
echo | |
printf "%-30s %-30s %-30s\n" "Package" "Fedora Version" "ALARM Version" | |
for P in $PKGS; do | |
B=$(echo $P | sed 's/\([A-Za-z-]*\)-[0-9].*/\1/') | |
V=$(echo $P | sed "s/$B-\([0-9].*\)/\1/") | |
if [[ "$B" == *overlay* ]]; then | |
continue | |
fi | |
O=$B | |
if [[ -n "${mappings[$B]}" ]]; then | |
B=${mappings[$B]} | |
fi | |
rpm -q $B &>/dev/null | |
if [ $? == 0 ]; then | |
F=$(rpm -q $B | sed "s/$B-\([0-9].*\).fc41.*/\1/" | tail -n 1) | |
else | |
F="/" | |
fi | |
printf "%-30s %-30s %-30s\n" "$O" "$F" "$V" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment