Skip to content

Commit

Permalink
Specify package list is being updated
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeRanger committed Dec 5, 2024
1 parent c98a079 commit 87ce462
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions run_onchange_install-packages.bash.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ case "{{ .chezmoi.os }}" in
echo "${C_INFO}Installing packages for Linux..."

# Install general packages
echo "${C_INFO}Installing general packages..."
if hash pacman &> /dev/null; then
sudo pacman -Syu --noconfirm
echo "${C_INFO}Updating package lists..."
sudo pacman -Sy --noconfirm
echo "${C_INFO}Installing general packages..."
{{- range .packages.linux.general }}
if pacman -Q "{{ . }}" &> /dev/null; then
echo "${C_NOTE}'{{ . }}' is already installed"
Expand All @@ -60,7 +61,9 @@ case "{{ .chezmoi.os }}" in
fi
{{- end }}
elif hash apt &> /dev/null; then
echo "${C_INFO}Updating package lists..."
sudo apt update
echo "${C_INFO}Installing general packages..."
{{- range .packages.linux.general }}
if dpkg -l "{{ . }}" &> /dev/null; then
echo "${C_NOTE}'{{ . }}' is already installed"
Expand Down

0 comments on commit 87ce462

Please sign in to comment.