post_install() {  
  local target_file="pangolin"
  local found=0

  if [ -f "/usr/local/bin/$target_file" ]; then
    found=1
  fi

  for user_home in /home/*; do
    if [ -f "$user_home/.local/bin/$target_file" ]; then
      found=1
      break
    fi
  done

  if [ "$found" -eq 1 ]; then
    echo -e "\n\e[1;33m[!] WARNING:\e[0m A manually installed version of pangolin was detected."
    echo -e "    It might shadow this package due to PATH priority."
    echo -e "    Recommended: \e[1mrm ~/.local/bin/pangolin /usr/local/bin/pangolin\e[0m\n"
  fi
}

post_upgrade() {
  post_install
}