Add RPM downloading and installation to build.sh for specifying custom github repos to download and install rpms from

This commit is contained in:
badblocks 2024-10-12 14:20:13 -07:00 committed by GitHub
parent 4e09679e35
commit e82d5a7769
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,6 +36,26 @@ rpm-ostree install \
# from rpmfusion # from rpmfusion
rpm-ostree install vlc rpm-ostree install vlc
# from RPMs on Github
# Space-separated list of repo/package strings
repos="quexten/goldwarden"
# Loop through each repo/package
for repo_package in $repos; do
# Split the string into repo and package using parameter expansion
repo=${repo_package%/*}
package=${repo_package#*/}
# Fetch the latest release download URL for .rpm assets
download_url=$(wget -qO- "https://api.github.com/repos/$repo/$package/releases/latest" \
| jq -r '.assets[] | select(.name | match(".rpm")) | .browser_download_url')
# Download the asset as <PACKAGE>.rpm
wget -qO "$package.rpm" "$download_url"
# Install the package
rpm-ostree install "$package.rpm"
done
#### Change to System Configuration Files #### Change to System Configuration Files