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