add support for Fedora linux

This commit is contained in:
2024-06-20 12:52:20 -04:00
parent e5c3667a18
commit 21d9b694ff
4 changed files with 14 additions and 1 deletions

View File

@@ -5,6 +5,11 @@ packages:
- curl
- fish
linux:
dnfs:
- git-all
- curl
- bash
- fish
apts:
- git
- curl

View File

@@ -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"

View File

@@ -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"

View File

@@ -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 -}}
{{ end -}}