-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bling): rpmfusion & negativo17 repo helpers
- Loading branch information
Showing
4 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Tell build process to exit if there are any errors. | ||
set -euo pipefail | ||
|
||
# Check if rpmfusion is installed before running | ||
if [[ "$(rpm -q rpmfusion-free-release)" == "rpmfusion-free-release"* && "$(rpm -q rpmfusion-nonfree-release)" == "rpmfusion-nonfree-release"* ]]; then | ||
|
||
echo "uninstalling rpmfusion..." | ||
rpm-ostree uninstall rpmfusion-free-release rpmfusion-nonfree-release | ||
|
||
fi | ||
|
||
# check if negativo17 repo is installed | ||
if [[ -f /etc/yum.repos.d/negativo17-fedora-multimedia.repo ]]; then | ||
|
||
echo "negativo17 repo is already installed" | ||
echo "making sure negativo17 repo is enabled" | ||
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo | ||
|
||
else | ||
|
||
echo "installing negativo17 repo..." | ||
curl -Lo /etc/yum.repos.d/negativo17-fedora-multimedia.repo https://negativo17.org/repos/fedora-multimedia.repo | ||
|
||
echo "setting negativo17 repo priority to 90..." | ||
sed -i '0,/enabled=1/{s/enabled=1/enabled=1\npriority=90/}' /etc/yum.repos.d/negativo17-fedora-multimedia.repo | ||
|
||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Tell build process to exit if there are any errors. | ||
set -euo pipefail | ||
|
||
# Check if rpmfusion is already installed before running | ||
if [[ "$(rpm -q rpmfusion-free-release)" != "rpmfusion-free-release"* && "$(rpm -q rpmfusion-nonfree-release)" != "rpmfusion-nonfree-release"* ]]; then | ||
|
||
echo "running rpmfusion install..." | ||
rpm-ostree install \ | ||
"https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-${OS_VERSION}.noarch.rpm" \ | ||
"https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-${OS_VERSION}.noarch.rpm" | ||
|
||
# check if negativo17 repo is installed | ||
if [[ -f /etc/yum.repos.d/negativo17-fedora-multimedia.repo ]]; then | ||
echo "making sure negativo17 repo is disabled" | ||
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo | ||
fi | ||
|
||
else | ||
|
||
echo "rpmfusion is already installed" | ||
|
||
fi |
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