From 0de7dea2dfbd7b975565c697f6974c7981789cd1 Mon Sep 17 00:00:00 2001 From: Angaddeep Singh <159604852+Angxddeep@users.noreply.github.com> Date: Sun, 3 Nov 2024 06:15:13 +0530 Subject: [PATCH 1/6] Dnf5 fixes --- core/tabs/applications-setup/Developer-tools/sublime-setup.sh | 2 +- core/tabs/applications-setup/browsers/brave.sh | 2 +- core/tabs/applications-setup/browsers/vivaldi.sh | 2 +- core/tabs/applications-setup/docker-setup.sh | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/tabs/applications-setup/Developer-tools/sublime-setup.sh b/core/tabs/applications-setup/Developer-tools/sublime-setup.sh index 16c03497..b2e14f79 100644 --- a/core/tabs/applications-setup/Developer-tools/sublime-setup.sh +++ b/core/tabs/applications-setup/Developer-tools/sublime-setup.sh @@ -23,7 +23,7 @@ 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 + "$ESCALATION_TOOL" "$PACKAGER" config-manager --addrepo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo "$ESCALATION_TOOL" "$PACKAGER" install -y sublime-text ;; *) diff --git a/core/tabs/applications-setup/browsers/brave.sh b/core/tabs/applications-setup/browsers/brave.sh index 8a7eab40..59f398b7 100644 --- a/core/tabs/applications-setup/browsers/brave.sh +++ b/core/tabs/applications-setup/browsers/brave.sh @@ -25,7 +25,7 @@ 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 + "$ESCALATION_TOOL" "$PACKAGER" config-manager --addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo "$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc "$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser ;; diff --git a/core/tabs/applications-setup/browsers/vivaldi.sh b/core/tabs/applications-setup/browsers/vivaldi.sh index 311816d0..e64985bd 100644 --- a/core/tabs/applications-setup/browsers/vivaldi.sh +++ b/core/tabs/applications-setup/browsers/vivaldi.sh @@ -15,7 +15,7 @@ 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 + "$ESCALATION_TOOL" "$PACKAGER" config-manager --addrepo https://repo.vivaldi.com/stable/vivaldi-fedora.repo "$ESCALATION_TOOL" "$PACKAGER" install -y vivaldi-stable ;; zypper) diff --git a/core/tabs/applications-setup/docker-setup.sh b/core/tabs/applications-setup/docker-setup.sh index 4844d10e..3132526e 100755 --- a/core/tabs/applications-setup/docker-setup.sh +++ b/core/tabs/applications-setup/docker-setup.sh @@ -28,7 +28,7 @@ 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 + "$ESCALATION_TOOL" "$PACKAGER" config-manager --addrepo https://download.docker.com/linux/fedora/docker-ce.repo "$ESCALATION_TOOL" "$PACKAGER" -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin "$ESCALATION_TOOL" systemctl enable --now docker ;; @@ -57,7 +57,7 @@ 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 + "$ESCALATION_TOOL" "$PACKAGER" config-manager --addrepo https://download.docker.com/linux/fedora/docker-ce.repo "$ESCALATION_TOOL" "$PACKAGER" install -y docker-compose-plugin ;; zypper) From 4be544688e0cdedaa02f9e337729f59bbfe92eed Mon Sep 17 00:00:00 2001 From: Angaddeep Singh <159604852+Angxddeep@users.noreply.github.com> Date: Sun, 3 Nov 2024 06:17:56 +0530 Subject: [PATCH 2/6] again fix :) --- core/tabs/applications-setup/Developer-tools/sublime-setup.sh | 2 +- core/tabs/applications-setup/browsers/brave.sh | 2 +- core/tabs/applications-setup/browsers/vivaldi.sh | 2 +- core/tabs/applications-setup/docker-setup.sh | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/tabs/applications-setup/Developer-tools/sublime-setup.sh b/core/tabs/applications-setup/Developer-tools/sublime-setup.sh index b2e14f79..f904cc57 100644 --- a/core/tabs/applications-setup/Developer-tools/sublime-setup.sh +++ b/core/tabs/applications-setup/Developer-tools/sublime-setup.sh @@ -23,7 +23,7 @@ installSublime() { ;; dnf) "$ESCALATION_TOOL" rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg - "$ESCALATION_TOOL" "$PACKAGER" config-manager --addrepo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo "$ESCALATION_TOOL" "$PACKAGER" install -y sublime-text ;; *) diff --git a/core/tabs/applications-setup/browsers/brave.sh b/core/tabs/applications-setup/browsers/brave.sh index 59f398b7..b2c7c2a7 100644 --- a/core/tabs/applications-setup/browsers/brave.sh +++ b/core/tabs/applications-setup/browsers/brave.sh @@ -25,7 +25,7 @@ installBrave() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core - "$ESCALATION_TOOL" "$PACKAGER" config-manager --addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo "$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc "$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser ;; diff --git a/core/tabs/applications-setup/browsers/vivaldi.sh b/core/tabs/applications-setup/browsers/vivaldi.sh index e64985bd..f0c394c6 100644 --- a/core/tabs/applications-setup/browsers/vivaldi.sh +++ b/core/tabs/applications-setup/browsers/vivaldi.sh @@ -15,7 +15,7 @@ installVivaldi() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core - "$ESCALATION_TOOL" "$PACKAGER" config-manager --addrepo https://repo.vivaldi.com/stable/vivaldi-fedora.repo + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo https://repo.vivaldi.com/stable/vivaldi-fedora.repo "$ESCALATION_TOOL" "$PACKAGER" install -y vivaldi-stable ;; zypper) diff --git a/core/tabs/applications-setup/docker-setup.sh b/core/tabs/applications-setup/docker-setup.sh index 3132526e..d1685c1b 100755 --- a/core/tabs/applications-setup/docker-setup.sh +++ b/core/tabs/applications-setup/docker-setup.sh @@ -28,7 +28,7 @@ install_docker() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core - "$ESCALATION_TOOL" "$PACKAGER" config-manager --addrepo https://download.docker.com/linux/fedora/docker-ce.repo + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo https://download.docker.com/linux/fedora/docker-ce.repo "$ESCALATION_TOOL" "$PACKAGER" -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin "$ESCALATION_TOOL" systemctl enable --now docker ;; @@ -57,7 +57,7 @@ install_docker_compose() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core - "$ESCALATION_TOOL" "$PACKAGER" config-manager --addrepo https://download.docker.com/linux/fedora/docker-ce.repo + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo https://download.docker.com/linux/fedora/docker-ce.repo "$ESCALATION_TOOL" "$PACKAGER" install -y docker-compose-plugin ;; zypper) From ff6322567629a7de00abe5897768269f32a1f5ff Mon Sep 17 00:00:00 2001 From: Angaddeep Singh <159604852+Angxddeep@users.noreply.github.com> Date: Sun, 3 Nov 2024 06:30:06 +0530 Subject: [PATCH 3/6] final fix --- core/tabs/applications-setup/Developer-tools/sublime-setup.sh | 2 +- core/tabs/applications-setup/browsers/brave.sh | 2 +- core/tabs/applications-setup/browsers/vivaldi.sh | 2 +- core/tabs/applications-setup/docker-setup.sh | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/tabs/applications-setup/Developer-tools/sublime-setup.sh b/core/tabs/applications-setup/Developer-tools/sublime-setup.sh index f904cc57..5f33d182 100644 --- a/core/tabs/applications-setup/Developer-tools/sublime-setup.sh +++ b/core/tabs/applications-setup/Developer-tools/sublime-setup.sh @@ -23,7 +23,7 @@ installSublime() { ;; dnf) "$ESCALATION_TOOL" rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo "$ESCALATION_TOOL" "$PACKAGER" install -y sublime-text ;; *) diff --git a/core/tabs/applications-setup/browsers/brave.sh b/core/tabs/applications-setup/browsers/brave.sh index b2c7c2a7..ccc127f7 100644 --- a/core/tabs/applications-setup/browsers/brave.sh +++ b/core/tabs/applications-setup/browsers/brave.sh @@ -25,7 +25,7 @@ installBrave() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo "$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc "$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser ;; diff --git a/core/tabs/applications-setup/browsers/vivaldi.sh b/core/tabs/applications-setup/browsers/vivaldi.sh index f0c394c6..ec0079ef 100644 --- a/core/tabs/applications-setup/browsers/vivaldi.sh +++ b/core/tabs/applications-setup/browsers/vivaldi.sh @@ -15,7 +15,7 @@ installVivaldi() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo https://repo.vivaldi.com/stable/vivaldi-fedora.repo + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://repo.vivaldi.com/stable/vivaldi-fedora.repo "$ESCALATION_TOOL" "$PACKAGER" install -y vivaldi-stable ;; zypper) diff --git a/core/tabs/applications-setup/docker-setup.sh b/core/tabs/applications-setup/docker-setup.sh index d1685c1b..c8c0c9dd 100755 --- a/core/tabs/applications-setup/docker-setup.sh +++ b/core/tabs/applications-setup/docker-setup.sh @@ -28,7 +28,7 @@ install_docker() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo https://download.docker.com/linux/fedora/docker-ce.repo + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo "$ESCALATION_TOOL" "$PACKAGER" -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin "$ESCALATION_TOOL" systemctl enable --now docker ;; @@ -57,7 +57,7 @@ install_docker_compose() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo https://download.docker.com/linux/fedora/docker-ce.repo + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo "$ESCALATION_TOOL" "$PACKAGER" install -y docker-compose-plugin ;; zypper) From 64cb3c860be21c20d6071e7666b5f703bf745786 Mon Sep 17 00:00:00 2001 From: Angaddeep Singh <159604852+Angxddeep@users.noreply.github.com> Date: Wed, 6 Nov 2024 11:07:41 +0530 Subject: [PATCH 4/6] added version check --- .../Developer-tools/sublime-setup.sh | 6 +++++- core/tabs/applications-setup/browsers/brave.sh | 6 +++++- core/tabs/applications-setup/browsers/vivaldi.sh | 6 +++++- core/tabs/applications-setup/docker-setup.sh | 12 ++++++++++-- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/core/tabs/applications-setup/Developer-tools/sublime-setup.sh b/core/tabs/applications-setup/Developer-tools/sublime-setup.sh index 5f33d182..d1186968 100644 --- a/core/tabs/applications-setup/Developer-tools/sublime-setup.sh +++ b/core/tabs/applications-setup/Developer-tools/sublime-setup.sh @@ -23,7 +23,11 @@ installSublime() { ;; dnf) "$ESCALATION_TOOL" rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo + if command -v dnf5 >/dev/null 2>&1; then + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo + elif command -v dnf >/dev/null 2>&1; then + "$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo + fi "$ESCALATION_TOOL" "$PACKAGER" install -y sublime-text ;; *) diff --git a/core/tabs/applications-setup/browsers/brave.sh b/core/tabs/applications-setup/browsers/brave.sh index ccc127f7..9916d492 100644 --- a/core/tabs/applications-setup/browsers/brave.sh +++ b/core/tabs/applications-setup/browsers/brave.sh @@ -25,7 +25,11 @@ installBrave() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo + if command -v dnf5 >/dev/null 2>&1; then + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo + elif command -v dnf >/dev/null 2>&1; then + "$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo 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 ;; diff --git a/core/tabs/applications-setup/browsers/vivaldi.sh b/core/tabs/applications-setup/browsers/vivaldi.sh index ec0079ef..d220f370 100644 --- a/core/tabs/applications-setup/browsers/vivaldi.sh +++ b/core/tabs/applications-setup/browsers/vivaldi.sh @@ -15,7 +15,11 @@ installVivaldi() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://repo.vivaldi.com/stable/vivaldi-fedora.repo + if command -v dnf5 >/dev/null 2>&1; then + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://repo.vivaldi.com/stable/vivaldi-fedora.repo + elif command -v dnf >/dev/null 2>&1; then + "$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://repo.vivaldi.com/stable/vivaldi-fedora.repo + fi "$ESCALATION_TOOL" "$PACKAGER" install -y vivaldi-stable ;; zypper) diff --git a/core/tabs/applications-setup/docker-setup.sh b/core/tabs/applications-setup/docker-setup.sh index c8c0c9dd..ab00a435 100755 --- a/core/tabs/applications-setup/docker-setup.sh +++ b/core/tabs/applications-setup/docker-setup.sh @@ -28,7 +28,11 @@ install_docker() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo + if command -v dnf5 >/dev/null 2>&1; then + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo + elif command -v dnf >/dev/null 2>&1; then + "$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo 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 ;; @@ -57,7 +61,11 @@ install_docker_compose() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo + if command -v dnf5 >/dev/null 2>&1; then + "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo + elif command -v dnf >/dev/null 2>&1; then + "$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo + fi "$ESCALATION_TOOL" "$PACKAGER" install -y docker-compose-plugin ;; zypper) From 9ded0220ae426c63932fac79b2caaabf447f338d Mon Sep 17 00:00:00 2001 From: Angaddeep Singh <159604852+Angxddeep@users.noreply.github.com> Date: Wed, 6 Nov 2024 20:23:28 +0530 Subject: [PATCH 5/6] Apply suggestions from code review Co-authored-by: Jeevitha Kannan K S --- core/tabs/applications-setup/browsers/brave.sh | 7 ++++--- core/tabs/applications-setup/browsers/vivaldi.sh | 7 ++++--- core/tabs/applications-setup/docker-setup.sh | 14 ++++++++------ 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/core/tabs/applications-setup/browsers/brave.sh b/core/tabs/applications-setup/browsers/brave.sh index 9916d492..720ce5d5 100644 --- a/core/tabs/applications-setup/browsers/brave.sh +++ b/core/tabs/applications-setup/browsers/brave.sh @@ -25,10 +25,11 @@ installBrave() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core - if command -v dnf5 >/dev/null 2>&1; then - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo - elif command -v dnf >/dev/null 2>&1; then + 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 diff --git a/core/tabs/applications-setup/browsers/vivaldi.sh b/core/tabs/applications-setup/browsers/vivaldi.sh index d220f370..28535a52 100644 --- a/core/tabs/applications-setup/browsers/vivaldi.sh +++ b/core/tabs/applications-setup/browsers/vivaldi.sh @@ -15,10 +15,11 @@ installVivaldi() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core - if command -v dnf5 >/dev/null 2>&1; then - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://repo.vivaldi.com/stable/vivaldi-fedora.repo - elif command -v dnf >/dev/null 2>&1; then + 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 ;; diff --git a/core/tabs/applications-setup/docker-setup.sh b/core/tabs/applications-setup/docker-setup.sh index ab00a435..e447a978 100755 --- a/core/tabs/applications-setup/docker-setup.sh +++ b/core/tabs/applications-setup/docker-setup.sh @@ -28,10 +28,11 @@ install_docker() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core - if command -v dnf5 >/dev/null 2>&1; then - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo - elif command -v dnf >/dev/null 2>&1; then + 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 @@ -61,10 +62,11 @@ install_docker_compose() { ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core - if command -v dnf5 >/dev/null 2>&1; then - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo - elif command -v dnf >/dev/null 2>&1; then + 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 ;; From 07f1ff9e2e82d424b511bef60d38889a537cadb6 Mon Sep 17 00:00:00 2001 From: Angaddeep Singh <159604852+Angxddeep@users.noreply.github.com> Date: Wed, 6 Nov 2024 20:23:46 +0530 Subject: [PATCH 6/6] Update core/tabs/applications-setup/Developer-tools/sublime-setup.sh Co-authored-by: Jeevitha Kannan K S --- .../applications-setup/Developer-tools/sublime-setup.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/tabs/applications-setup/Developer-tools/sublime-setup.sh b/core/tabs/applications-setup/Developer-tools/sublime-setup.sh index d1186968..18843752 100644 --- a/core/tabs/applications-setup/Developer-tools/sublime-setup.sh +++ b/core/tabs/applications-setup/Developer-tools/sublime-setup.sh @@ -23,10 +23,11 @@ installSublime() { ;; dnf) "$ESCALATION_TOOL" rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg - if command -v dnf5 >/dev/null 2>&1; then - "$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo - elif command -v dnf >/dev/null 2>&1; then + 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 ;;