Skip to content

Commit

Permalink
chore: Fix some indetation pt. 2
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftydinar authored Nov 24, 2024
1 parent fb82f72 commit 024ef49
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions modules/bling/installers/negativo17.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ NEGATIVO_REPO_FILE="$(awk -F'=' '$1 == "name" && $2 == "negativo17 - Multimedia"

# check if negativo17 repo is installed
if [[ -n "${NEGATIVO_REPO_FILE}" ]]; then
echo "Negativo17 repo is already installed"
echo "Making sure that Negativo17 repo is enabled"
# Set all Negativo repo sources to disabled
sed -i 's@enabled=.*@enabled=0@g' "${NEGATIVO_REPO_FILE}"
# Enable only the 1st repo source (Multimedia repo)
sed -i '0,/enabled=/s/enabled=[^ ]*/enabled=1/' "${NEGATIVO_REPO_FILE}"
# Wipe all existing source priorities
sed -i '/priority=/d' "${NEGATIVO_REPO_FILE}"
# Set priority to 90 for 1st repo source (Multimedia repo)
sed -i '0,/enabled=1/{s/enabled=1/enabled=1\npriority=90/}' "${NEGATIVO_REPO_FILE}"
echo "Negativo17 repo is already installed"
echo "Making sure that Negativo17 repo is enabled"
# Set all Negativo repo sources to disabled
sed -i 's@enabled=.*@enabled=0@g' "${NEGATIVO_REPO_FILE}"
# Enable only the 1st repo source (Multimedia repo)
sed -i '0,/enabled=/s/enabled=[^ ]*/enabled=1/' "${NEGATIVO_REPO_FILE}"
# Wipe all existing source priorities
sed -i '/priority=/d' "${NEGATIVO_REPO_FILE}"
# Set priority to 90 for 1st repo source (Multimedia repo)
sed -i '0,/enabled=1/{s/enabled=1/enabled=1\npriority=90/}' "${NEGATIVO_REPO_FILE}"
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
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

0 comments on commit 024ef49

Please sign in to comment.