punkfairie
debc1402a8
Add .chezmoidata/catppuccin-latte.toml Add .chezmoidata/catppuccin-macchato.toml Add .chezmoidata/catppuccin-mocha.toml Update .config/packages/archbaby Update .config/packages/arch-packages.fish
27 lines
659 B
Cheetah
27 lines
659 B
Cheetah
{{ if eq .chezmoi.osRelease.id "arch" -}}
|
|
#!/usr/bin/env fish
|
|
|
|
{{ range (glob ".config/packages/arch?*") -}}
|
|
# {{ include (joinPath "dot_config/packages/" (base .)) | sha256sum }}
|
|
{{ end -}}
|
|
|
|
set file (\
|
|
find . -type f -iname "arch*" -print0\
|
|
| xargs -0 ls -tr\
|
|
| tail -n 1\
|
|
| string sub -s 3\
|
|
)
|
|
|
|
cp $file arch
|
|
|
|
{{ range .packages.arch.exclude -}}
|
|
sed -i '/{{ . }}/d' arch
|
|
{{ end -}}
|
|
|
|
if ! test "{{ .chezmoi.hostname }}" = "$file"
|
|
set_color yellow && echo "Package list has changed, reinstalling..."
|
|
yay -S --needed - <~/.config/packages/arch
|
|
end
|
|
|
|
yay -Qeq >{{ joinPath .chezmoi.sourceDir "dot_config/packages" .chezmoi.hostname }}
|
|
{{ end -}}
|