Skip to content

Commit

Permalink
fix(fedora): Recent syntax changes with DNF5 (#907)
Browse files Browse the repository at this point in the history
* Dnf5 fixes

* again fix :)

* final fix

* added version check

* Apply suggestions from code review

Co-authored-by: Jeevitha Kannan K S <[email protected]>

* Update core/tabs/applications-setup/Developer-tools/sublime-setup.sh

Co-authored-by: Jeevitha Kannan K S <[email protected]>

---------

Co-authored-by: Jeevitha Kannan K S <[email protected]>
  • Loading branch information
Angxddeep and jeevithakannan2 authored Nov 11, 2024
1 parent da5fb7a commit f400eee
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ installSublime() {
;;
dnf)
"$ESCALATION_TOOL" rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
dnf_version=$(dnf --version | head -n 1 | cut -d '.' -f 1)
if [ "$dnf_version" -eq 4 ]; then
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo
else
"$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo
fi
"$ESCALATION_TOOL" "$PACKAGER" install -y sublime-text
;;
*)
Expand Down
7 changes: 6 additions & 1 deletion core/tabs/applications-setup/browsers/brave.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ installBrave() {
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
dnf_version=$(dnf --version | head -n 1 | cut -d '.' -f 1)
if [ "$dnf_version" -eq 4 ]; then
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
else
"$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
fi
"$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
"$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser
;;
Expand Down
7 changes: 6 additions & 1 deletion core/tabs/applications-setup/browsers/vivaldi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ installVivaldi() {
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://repo.vivaldi.com/stable/vivaldi-fedora.repo
dnf_version=$(dnf --version | head -n 1 | cut -d '.' -f 1)
if [ "$dnf_version" -eq 4 ]; then
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://repo.vivaldi.com/stable/vivaldi-fedora.repo
else
"$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://repo.vivaldi.com/stable/vivaldi-fedora.repo
fi
"$ESCALATION_TOOL" "$PACKAGER" install -y vivaldi-stable
;;
zypper)
Expand Down
14 changes: 12 additions & 2 deletions core/tabs/applications-setup/docker-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ install_docker() {
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
dnf_version=$(dnf --version | head -n 1 | cut -d '.' -f 1)
if [ "$dnf_version" -eq 4 ]; then
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
else
"$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo
fi
"$ESCALATION_TOOL" "$PACKAGER" -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
"$ESCALATION_TOOL" systemctl enable --now docker
;;
Expand Down Expand Up @@ -58,7 +63,12 @@ install_docker_compose() {
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
dnf_version=$(dnf --version | head -n 1 | cut -d '.' -f 1)
if [ "$dnf_version" -eq 4 ]; then
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
else
"$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo
fi
"$ESCALATION_TOOL" "$PACKAGER" install -y docker-compose-plugin
;;
zypper)
Expand Down

0 comments on commit f400eee

Please sign in to comment.