Update 8 files

- /home/.chezmoiscripts/fedora/run_onchange_before_10-install-fedora-dependencies.tmpl
- /home/.chezmoiscripts/ubuntu/run_onchange_before_10_install-ubuntu-dependencies.tmpl
- /home/.chezmoiscripts/opensuse/run_onchange_before_11-install-opensuse-software.tmpl
- /home/.chezmoiscripts/freebsd/run_onchange_before_11-install-freebsd-packages.tmpl
- /home/.chezmoiscripts/debian/run_onchange_before_10-install-debian-dependencies.tmpl
- /home/.chezmoiscripts/centos/run_onchange_before_10-install-centos-dependencies.tmpl
- /home/.chezmoiscripts/archlinux/run_onchange_before_10_install-archlinux-dependencies.tmpl
- /home/.chezmoitemplates/universal/essential-packages
This commit is contained in:
Brian Zalewski 2022-12-25 09:27:42 +00:00
parent ed4add3305
commit bc8a44b853
8 changed files with 85 additions and 97 deletions

View file

@ -5,38 +5,33 @@
{{ includeTemplate "universal/logg" }} {{ includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }}
{{- $gpgDependencies := list {{- $additionalPackages := list
gnupg2
gnupg-agent
gnupg-curl
scdaemon
pcscd
-}}
{{- if .toolchains.gpg }}
{{- $packages = concat $packages $gpgDependencies -}}
{{- end }}
{{- $pyenvDependencies := list
"base-devel" "base-devel"
"openssl" "openssl"
"zlib" "zlib"
"xz" "xz"
"tk" "tk"
}} }}
{{- if .toolchains.python }} {{- $packages = concat $packages $additionalPackages -}}
{{- $packages = concat $packages $pyenvDependencies -}}
{{- end }}
logg 'Installing common dependencies using `pacman`' logg 'Installing common dependencies using `pacman`'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}' logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Install base dependencies for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
sudo pacman -Sy --noconfirm --needed {{ $packages | sortAlpha | uniq | join " " -}} logg info 'Installing `'"$PACKAGE"'`'
sudo pacman -Sy --noconfirm --needed "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via pacman'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
done
### Install yay ### Install yay
if ! command -v yay > /dev/null; then if ! command -v yay > /dev/null; then
logg 'Cloning yay from `https://aur.archlinux.org/yay.git` to `/usr/local/src/yay`' logg info 'Cloning yay from `https://aur.archlinux.org/yay.git` to `/usr/local/src/yay`'
sudo git clone https://aur.archlinux.org/yay.git /usr/local/src/yay sudo git clone https://aur.archlinux.org/yay.git /usr/local/src/yay
cd /usr/local/src/yay cd /usr/local/src/yay
logg 'Installing yay via `sudo makepkg -si`' logg info 'Installing yay via `sudo makepkg -si`'
sudo makepkg -si sudo makepkg -si
fi fi

View file

@ -5,20 +5,31 @@
{{ includeTemplate "universal/logg" }} {{ includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }}
# TODO - Add Python dependencies like in ubuntu/archlinux
{{- $gpgDependencies := list
gnupg2
gnupg-agent
gnupg-curl
scdaemon
pcscd
-}}
{{- if .toolchains.gpg }}
{{- $packages = concat $packages $gpgDependencies -}}
{{- end }}
logg 'Installing common dependencies using `dnf`' if command -v dnf > /dev/null; then
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}' logg 'Installing common dependencies using `dnf`'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Install base dependencies for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
sudo dnf install -y {{ $packages | sortAlpha | uniq | join " " -}} logg info 'Installing `'"$PACKAGE"'`'
sudo dnf install -y "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via dnf'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
done
else
logg 'Installing common dependencies using `yum`'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Installing `'"$PACKAGE"'`'
sudo yum install -y "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via yum'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
done
fi

View file

@ -5,26 +5,12 @@
{{ includeTemplate "universal/logg" }} {{ includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) -}} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) -}}
{{- $gpgDependencies := list {{- $additionalPackages := list
gnupg2
gnupg-agent
gnupg-curl
scdaemon
pcscd
-}}
{{- if .toolchains.gpg }}
{{- $packages = concat $packages $gpgDependencies -}}
{{- end }}
{{- $pyenvDependencies := list
"make"
"build-essential"
"libssl-dev" "libssl-dev"
"zlib1g-dev" "zlib1g-dev"
"libbz2-dev" "libbz2-dev"
"libreadline-dev" "libreadline-dev"
"libsqlite3-dev" "libsqlite3-dev"
"wget"
"curl"
"llvm" "llvm"
"libncursesw5-dev" "libncursesw5-dev"
"xz-utils" "xz-utils"
@ -34,12 +20,19 @@ pcscd
"libffi-dev" "libffi-dev"
"liblzma-dev" "liblzma-dev"
-}} -}}
{{- if .toolchains.python }} {{- $packages = concat $packages $additionalPackages -}}
{{- $packages = concat $packages $pyenvDependencies -}}
{{- end }}
logg 'Installing common dependencies using `apt-get`' logg 'Installing common dependencies using `apt-get`'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}' logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
logg info 'Running `sudo apt-get update`'
sudo apt-get update sudo apt-get update
sudo apt-get install -y --no-install-recommends {{ $packages | sortAlpha | uniq | join " " -}} for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Installing `'"$PACKAGE"'`'
sudo apt-get install -y --no-install-recommends "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via apt-get'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
done

View file

@ -5,20 +5,16 @@
{{ includeTemplate "universal/logg" }} {{ includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }}
# TODO - Add Python dependencies like in ubuntu/archlinux
{{- $gpgDependencies := list
gnupg2
gnupg-agent
gnupg-curl
scdaemon
pcscd
-}}
{{- if .toolchains.gpg }}
{{- $packages = concat $packages $gpgDependencies -}}
{{- end }}
logg 'Installing common dependencies using `dnf`' logg 'Installing common dependencies using `dnf`'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}' logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Install base dependencies for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
sudo dnf install -y {{ $packages | sortAlpha | uniq | join " " -}} logg info 'Installing `'"$PACKAGE"'`'
sudo dnf install -y "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via dnf'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
done

View file

@ -5,20 +5,17 @@
{{ includeTemplate "universal/logg" }} {{ includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }}
# TODO - Add Python dependencies like in ubuntu/archlinux
{{- $gpgDependencies := list
gnupg2
gnupg-agent
gnupg-curl
scdaemon
pcscd
-}}
{{- if .toolchains.gpg }}
{{- $packages = concat $packages $gpgDependencies -}}
{{- end }}
logg 'Installing common dependencies using `pkg`' logg 'Installing common dependencies using `pkg`'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}' logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Install base dependencies ### Install base dependencies
sudo pkg install -y {{ $packages | sortAlpha | uniq | join " " -}} for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Installing `'"$PACKAGE"'`'
sudo pkg install -y "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via zypper'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
done

View file

@ -5,20 +5,17 @@
{{ includeTemplate "universal/logg" }} {{ includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) }}
# TODO - Add Python dependencies like in ubuntu/archlinux
{{- $gpgDependencies := list
gnupg2
gnupg-agent
gnupg-curl
scdaemon
pcscd
-}}
{{- if .toolchains.gpg }}
{{- $packages = concat $packages $gpgDependencies -}}
{{- end }}
logg 'Installing common dependencies using `zypper`' logg 'Installing common dependencies using `zypper`'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}' logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Install base dependencies ### Install base dependencies
sudo zypper install -y {{ $packages | sortAlpha | uniq | join " " -}} for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Installing `'"$PACKAGE"'`'
sudo zypper install -y "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via zypper'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
done

View file

@ -5,13 +5,6 @@
{{ includeTemplate "universal/logg" }} {{ includeTemplate "universal/logg" }}
{{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) -}} {{- $packages := splitList " " (includeTemplate "universal/essential-packages" .) -}}
{{- $gpgDependencies := list
"gnupg2"
"gnupg-agent"
"scdaemon"
"pcscd"
-}}
{{- $packages = concat $packages $gpgDependencies -}}
logg 'Installing common dependencies using `apt-get`' logg 'Installing common dependencies using `apt-get`'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}' logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
@ -22,7 +15,7 @@ for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Installing `'"$PACKAGE"'`' logg info 'Installing `'"$PACKAGE"'`'
sudo apt-get install -y --no-install-recommends "$PACKAGE" || EXIT_CODE=$? sudo apt-get install -y --no-install-recommends "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'`' logg error 'Error installing `'"$PACKAGE"'` via apt-get'
logg info 'Proceeding with installation..' logg info 'Proceeding with installation..'
unset EXIT_CODE unset EXIT_CODE
fi fi

View file

@ -6,11 +6,17 @@
"exa" "exa"
"git" "git"
"gnupg" "gnupg"
"gnupg-agent"
"gnupg-curl"
"gnupg2"
"htop" "htop"
"httpie" "httpie"
"jq" "jq"
"make"
"neovim" "neovim"
"pcscd"
"ripgrep" "ripgrep"
"scdaemon"
"tmux" "tmux"
"wget" "wget"
"zsh" "zsh"