- if ! zenity --question \
- --text="To run '$ai_command', $ai_package package needs to be installed. Do you want to proceed?"; then
- exit 2
- fi
+ # Figure out amount of space to download/occupy
+ space_info="$(LC_ALL=C apt-get --trivial-only --print-uris install $ai_package 2>/dev/null \
+ | grep -e '^\(Need to get \|After this\)' || : )"
+ if [ $ai_force -eq 0 ]; then
+ if ! zenity --question \
+ --text="To run '$ai_command', $ai_package package needs to be installed.
+
+$space_info
+
+Do you want to proceed?"; then
+ exit 2
+ fi
+ fi