feat(postinstall): only update pkgfile if packages were installed; propagate flag from all package modules
This commit is contained in:
parent
145e652380
commit
638fc47dc2
@ -36,6 +36,7 @@ done
|
||||
|
||||
if [ "${#to_install[@]}" -gt 0 ]; then
|
||||
paru -S --noconfirm "${to_install[@]}"
|
||||
export DOTFILES_PACKAGES_UPDATED=1
|
||||
else
|
||||
echo "All packages already installed."
|
||||
fi
|
||||
|
||||
@ -25,6 +25,7 @@ done
|
||||
if [ "${#to_install[@]}" -gt 0 ]; then
|
||||
paru -S --noconfirm "${to_install[@]}"
|
||||
echo "Sound packages installed."
|
||||
export DOTFILES_PACKAGES_UPDATED=1
|
||||
else
|
||||
echo "All sound packages already installed."
|
||||
fi
|
||||
|
||||
@ -33,6 +33,7 @@ done
|
||||
if [ "${#to_install[@]}" -gt 0 ]; then
|
||||
paru -S --noconfirm "${to_install[@]}"
|
||||
echo "Hyprland and related tools installed and configured."
|
||||
export DOTFILES_PACKAGES_UPDATED=1
|
||||
else
|
||||
echo "All Hyprland and related tools already installed."
|
||||
fi
|
||||
|
||||
@ -19,6 +19,7 @@ done
|
||||
if [ "${#to_install[@]}" -gt 0 ]; then
|
||||
paru -S --noconfirm "${to_install[@]}"
|
||||
echo "Browsers installed."
|
||||
export DOTFILES_PACKAGES_UPDATED=1
|
||||
else
|
||||
echo "All browsers already installed."
|
||||
fi
|
||||
|
||||
@ -28,6 +28,7 @@ done
|
||||
if [ "${#to_install[@]}" -gt 0 ]; then
|
||||
paru -S --noconfirm "${to_install[@]}"
|
||||
echo "Development tools installed."
|
||||
export DOTFILES_PACKAGES_UPDATED=1
|
||||
else
|
||||
echo "All development tools already installed."
|
||||
fi
|
||||
|
||||
@ -2,15 +2,11 @@
|
||||
# Post-install steps for dotfiles setup
|
||||
|
||||
# Update pkgfile database for command-not-found suggestions
|
||||
if command -v pkgfile &>/dev/null; then
|
||||
if command -v pkgfile &>/dev/null && [ "$DOTFILES_PACKAGES_UPDATED" = "1" ]; then
|
||||
echo "Updating pkgfile database..."
|
||||
sudo pkgfile --update
|
||||
fi
|
||||
|
||||
# Rehash zsh command hash table so new executables are found
|
||||
if command -v zsh &>/dev/null; then
|
||||
echo "Running zsh rehash..."
|
||||
zsh -c 'rehash'
|
||||
else
|
||||
echo "Skipping pkgfile update (no packages installed)."
|
||||
fi
|
||||
|
||||
# Add other post-install steps here as needed
|
||||
|
||||
Loading…
Reference in New Issue
Block a user