Skip to content

Commit

Permalink
chore(akmods): Revert using readonly
Browse files Browse the repository at this point in the history
It looks less clean & readable in code
  • Loading branch information
fiftydinar authored Oct 1, 2024
1 parent 1570473 commit 3b646c1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions modules/akmods/akmods.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@ ENABLE_MULTIMEDIA_REPO() {
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo
sed -i "0,/enabled/ s@enabled=0@enabled=1@g" /etc/yum.repos.d/negativo17-fedora-multimedia.repo
}
readonly -f ENABLE_MULTIMEDIA_REPO

DISABLE_MULTIMEDIA_REPO() {
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo
}
readonly -f DISABLE_MULTIMEDIA_REPO

SET_HIGHER_PRIORITY_AKMODS_REPO() {
echo "priority=90" >> /etc/yum.repos.d/_copr_ublue-os-akmods.repo
}
readonly -f SET_HIGHER_PRIORITY_AKMODS_REPO

get_yaml_array INSTALL '.install[]' "$1"

INSTALL_PATH=("${INSTALL[@]/#/\/tmp/rpms/kmods/*}")
readonly INSTALL_PATH=("${INSTALL_PATH[@]/%/*.rpm}")
readonly INSTALL_STR=$(echo "${INSTALL_PATH[*]}" | tr -d '\n')
INSTALL_PATH=("${INSTALL_PATH[@]/%/*.rpm}")
INSTALL_STR=$(echo "${INSTALL_PATH[*]}" | tr -d '\n')

if [[ ${#INSTALL[@]} -gt 0 ]]; then
echo "Installing akmods"
Expand Down

0 comments on commit 3b646c1

Please sign in to comment.