Created
October 20, 2021 01:11
-
-
Save jmpolom/793abb523c10e9df9cb46c1ba63de4d5 to your computer and use it in GitHub Desktop.
To assemble fedora kernel package location
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 | |
#KERNEL_VERSION=$(uname -r) | |
KERNEL_VERSION="5.13.3-200.fc34.x86_64" | |
KERNEL_RPM_VERSION=${KERNEL_VERSION%-*} | |
echo $KERNEL_RPM_VERSION | |
KERNEL_RPM_RELEASE=${KERNEL_VERSION%.*} | |
echo $KERNEL_RPM_RELEASE | |
KERNEL_RPM_RELEASE=${KERNEL_RPM_RELEASE#*-} | |
echo $KERNEL_RPM_RELEASE | |
KERNEL_RPM_ARCH=${KERNEL_VERSION##*.} | |
echo $KERNEL_RPM_ARCH | |
KOJI_BASE="http://kojipkgs.fedoraproject.org/packages" | |
KOJI_URL=$KOJI_BASE/kernel/$KERNEL_RPM_VERSION/$KERNEL_RPM_RELEASE/$KERNEL_RPM_ARCH/kernel-devel-$KERNEL_VERSION.rpm | |
echo $KOJI_URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment