diff --git a/modules/01-packages.sh b/modules/01-packages.sh index 97a63b8..3cad1ae 100755 --- a/modules/01-packages.sh +++ b/modules/01-packages.sh @@ -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 diff --git a/modules/05-sound.sh b/modules/05-sound.sh index 8279fff..833b18c 100755 --- a/modules/05-sound.sh +++ b/modules/05-sound.sh @@ -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 diff --git a/modules/06-hyprland.sh b/modules/06-hyprland.sh index 64a171c..7390427 100755 --- a/modules/06-hyprland.sh +++ b/modules/06-hyprland.sh @@ -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 diff --git a/modules/07-browsers.sh b/modules/07-browsers.sh index 3fe6e3b..70d6be3 100755 --- a/modules/07-browsers.sh +++ b/modules/07-browsers.sh @@ -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 diff --git a/modules/50-devtools.sh b/modules/50-devtools.sh index bd67aaa..c1b687c 100755 --- a/modules/50-devtools.sh +++ b/modules/50-devtools.sh @@ -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 diff --git a/modules/99-postinstall.sh b/modules/99-postinstall.sh index be08d6d..0f1f504 100755 --- a/modules/99-postinstall.sh +++ b/modules/99-postinstall.sh @@ -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