Created
July 29, 2022 15:00
-
-
Save omajid/f2f577846a30659761ce3080757fbf5e to your computer and use it in GitHub Desktop.
package-versions-in-distros
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 | |
set -euo pipefail | |
IFS=$'\n\t' | |
package=$1 | |
echo " # Alpine" | |
podman run -it -q alpine:3.13 /bin/sh -c "apk update -q; apk info $package" | |
echo " # CentOS 7" | |
podman run -it -q quay.io/centos/centos:7 /bin/bash -c "yum info -q $package" | |
echo " # CentOS Stream 8" | |
podman run -it -q quay.io/centos/centos:stream8 /bin/bash -c "dnf info -q $package" | |
echo " # CentOS Stream 9" | |
podman run -it -q quay.io/centos/centos:stream9 /bin/bash -c "dnf info -q $package" | |
echo " # Debian 9" | |
podman run -it -q debian:9 /bin/bash -c "apt -qq update ; apt show $package" | |
echo " # Debian 10" | |
podman run -it -q debian:10 /bin/bash -c "apt -qq update ; apt show $package" | |
echo " # Debian 11" | |
podman run -it -q debian:11 /bin/bash -c "apt -qq update ; apt show $package" | |
echo " # Fedora 35" | |
podman run -it -q fedora:35 /bin/bash -c "dnf info -q $package" | |
echo " # Homebrew" | |
curl -sSL "https://formulae.brew.sh/api/formula/$package.json" | jq -r ".versions.stable" | |
echo " # OpenSUSE Leap 15.3" | |
podman run -it -q opensuse/leap:15.3 /bin/bash -c "zypper -q info $package" | |
echo " # OpenSUSE Tumbleweed" | |
podman run -it -q opensuse/tumbleweed /bin/bash -c "zypper -q info $package" | |
echo " # RHEL 8" | |
podman run -it -q registry.access.redhat.com/ubi8 /bin/bash -c "dnf info -q $package" | |
echo " # RHEL 9" | |
podman run -it -q registry.access.redhat.com/ubi9 /bin/bash -c "dnf info -q $package" | |
echo " # Ubuntu 20.04" | |
podman run -it -q ubuntu:20.04 /bin/bash -c "apt -qq update; apt show $package" | |
echo " # Ubuntu 22.04" | |
podman run -it -q ubuntu:22.04 /bin/bash -c "apt -qq update; apt show $package" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment