From 21d9b694ffbc4347e4a16b23b230f11171dcc639 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 20 Jun 2024 12:52:20 -0400 Subject: [PATCH] add support for Fedora linux --- .chezmoidata/packages.yaml | 5 +++++ run_once_after_install2.sh.tmpl | 2 ++ run_once_before_install.sh.tmpl | 2 ++ run_onchange_install-packages.sh.tmpl | 6 +++++- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.chezmoidata/packages.yaml b/.chezmoidata/packages.yaml index 40da855..eda855b 100644 --- a/.chezmoidata/packages.yaml +++ b/.chezmoidata/packages.yaml @@ -5,6 +5,11 @@ packages: - curl - fish linux: + dnfs: + - git-all + - curl + - bash + - fish apts: - git - curl diff --git a/run_once_after_install2.sh.tmpl b/run_once_after_install2.sh.tmpl index 9434ca8..0b681d3 100644 --- a/run_once_after_install2.sh.tmpl +++ b/run_once_after_install2.sh.tmpl @@ -7,6 +7,8 @@ echo "[-] Running post-installation script [-]" {{- if eq .chezmoi.osRelease.id "alpine" }} echo "Alpine Linux detected" +{{- else if eq .chezmoi.osRelease.id "fedora" }} +echo "Fedora Linux detected" {{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }} echo "Debian-based Linux detected" diff --git a/run_once_before_install.sh.tmpl b/run_once_before_install.sh.tmpl index dc52598..e6ecb0b 100644 --- a/run_once_before_install.sh.tmpl +++ b/run_once_before_install.sh.tmpl @@ -6,6 +6,8 @@ echo "[-] Running pre-installation script [-]" {{- if eq .chezmoi.osRelease.id "alpine" }} echo "Alpine Linux detected" +{{- else if eq .chezmoi.osRelease.idLike "fedora" }} +echo "Fedora Linux detected" {{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }} echo "Debian-based Linux detected" diff --git a/run_onchange_install-packages.sh.tmpl b/run_onchange_install-packages.sh.tmpl index e1bc745..84507cb 100644 --- a/run_onchange_install-packages.sh.tmpl +++ b/run_onchange_install-packages.sh.tmpl @@ -11,6 +11,10 @@ apk update {{ range .packages.linux.apks -}} apk add {{ . | quote }} {{ end -}} +{{- else if eq .chezmoi.osRelease.idLike "fedora" }} +{{ range .packages.linux.dnfs -}} +sudo dnf install -y {{ . | quote }} +{{ end -}} {{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }} echo "[-] Updating Apt packages [-]" sudo apt update @@ -44,4 +48,4 @@ fi echo "[-] Updating Webman packages [-]" {{ range .packages.webman.pkgs -}} ~/.webman/bin/webman upgrade {{ . | quote }} -{{ end -}} \ No newline at end of file +{{ end -}}